class
Kemal::KeyError
- Kemal::KeyError
- KeyError
- Exception
- Reference
- Object
Overview
Exception raised when a required parameter is not found 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.
Example
@[Get("/users")]
def index(name : String) # name is required
"Hello, #{name}"
end
# GET /users without ?name=... will raise Kemal::KeyError