-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
REST: Difficult to debug scenarios with malformed headers #1229
Comments
Are you sure the 415 isn't enough here? It means the media type is not supported, and indeed this media type is not valid and therefore not supported. If you get a 415 all you gotta check is the content-type header you sent, it should be straightforward. |
In this specific case, perhaps. Providing more info one way or another would be appreciated (e.g. logging at debug level?). |
Not much point doing extra logging when we have tracing. I do have plans for an integrated tracing solution for debugging purposes though (will become work on that this or next week I think). |
I'll leave this one up to you. I didn't find this straightforward but that's probably due to my unfamiliarity with cowboy. |
This is probably best handled at this time via |
This code swallows the exception from
cowboy_req:parse_header
and returns a generic415
response. In my case, this is the exception detail that I saw via tracing:I did a quick search to see if it's acceptable to return a body with a
415
response but couldn't find information about that. So, I'm wondering if including atext/plain
body in the above scenario would be appropriate:If you're curious, this is the header that caused the exception:
I'm using Cowboy 2.0. Thanks!
The text was updated successfully, but these errors were encountered: