class Kemal::MissingParameterError

Overview

Exception raised when a required parameter is not present in the request.

This error is raised when a controller method declares a non-nilable parameter but the corresponding key is missing from the request data (query string, body, or URL segments).

Example

@[Get("/users")]
def index(name : String) # name is required
  "Hello, #{name}"
end
# GET /users without ?name=... will raise Kemal::MissingParameterError

Defined in:

kemal/from_www_form.cr

Constructors

Constructor Detail

def self.new(param_name : String) #

[View source]