class
Kemal::MissingParameterError
- Kemal::MissingParameterError
- Exception
- Reference
- Object
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