You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm finding your library very interesting, thanks for writing the "mig by example" documentation, it's a pleasure to read!
Given this handler definition
-- http GET localhost:8082/api/auth X-Token:ABC-123auth::Header"X-Token"Text->Get (RespText)
auth (Header authToken) =pure$if authToken =="ABC-123"then ok "Access granted"else bad unauthorized401 "Invalid token"
I would expect the HTTP clients to receive an HTTP 400 bad request status code, rather than a 500 internal error status code. That's because they made a badly formed request.
Appart from making the parameters optional and checking them myself (which I feel would defeat the purpose of the library), can I override this default behavior? Or if my explanation is convincing, could the default behavior be changed?
The text was updated successfully, but these errors were encountered:
Hello! I'm finding your library very interesting, thanks for writing the "mig by example" documentation, it's a pleasure to read!
Given this handler definition
I would expect the HTTP clients to receive an HTTP 400 bad request status code, rather than a 500 internal error status code. That's because they made a badly formed request.
Appart from making the parameters optional and checking them myself (which I feel would defeat the purpose of the library), can I override this default behavior? Or if my explanation is convincing, could the default behavior be changed?
The text was updated successfully, but these errors were encountered: