We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here the status code is allowed to be nil, causing the compiler to complain:
nil
in ./libs/amethyst/amethyst/base/handler.cr:12: instantiating 'Amethyst::Http::Response#build()' response.build ^~~~~ in ./libs/amethyst/amethyst/http/response.cr:23: instantiating 'HTTP::Response:Class#new((Nil | Int32), String, HTTP::Headers)' return HTTP::Response.new(@status, @body, headers = @headers) ^~~ instantiating 'HTTP::Response#initialize((Nil | Int32), String, HTTP::Headers, Nil, String, Nil)' in /Users/giorgio/Documents/crystal/src/http/response.cr:14: instantiating 'HTTP::Response:Class#mandatory_body?((Nil | Int32))' if Response.mandatory_body?(@status_code) ^~~~~~~~~~~~~~~ in /Users/giorgio/Documents/crystal/src/http/response.cr:77: undefined method '/' for Nil (compile-time type is (Nil | Int32)) !(status_code / 100 == 1 || status_code == 204 || status_code == 304)
Either Http::Response.new should not allow a nil status code, or Http::Response.build should check for that and use a "default" one.
Http::Response.new
Http::Response.build
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here the status code is allowed to be
nil
, causing the compiler to complain:Either
Http::Response.new
should not allow a nil status code, orHttp::Response.build
should check for that and use a "default" one.The text was updated successfully, but these errors were encountered: