-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Enhancement] Improve clarity of Bind invalid Content-Type message #605
Comments
This issue is currently awaiting triage. |
I don't seem to be able to reproduce this by using curl to POST to the curl -XPOST http://localhost:8080/applications -d '{"name":"testapp"}'
# works
curl -XPOST -H"Content-Type:" http://localhost:8080/applications -d '{"name":"testapp"}'
# works
curl -XPOST -H"Content-Type: " http://localhost:8080/applications -d '{"name":"testapp"}'
# works
curl -XPOST -H"Content-Type: xyz" http://localhost:8080/applications -d '{"name":"testapp"}'
# mime type error, as expected |
Very interesting, I wonder if the javascript |
After searching, it looks like if empty content in fetch, the spec says it sends text/html by default. I think that if I was an end user of the API, and I didn't have access to the pod logs, I would be pretty confused about what is going wrong. Unless it does exist already and I didn't see it in my testing for whatever reason. if that is the case let's just close this issue? |
The API does return a reason in the message body ( |
+1, now I have to figure out why the body was not printed in my code :) |
@shawn-hurley Can this issue be closed? |
@jortel I repurposed it into an enhancement issue to improve the clarity of the error message. |
Is there an existing issue for this?
Konveyor version
v0.3.0
Priority
Minor
Current Behavior
When calling the API from a client without setting the
Content-Type
header the application will error with a "Bind: MIME not supported" error, and the response is empty message 400 to the user.Expected Behavior
I thought that we could do a couple of things, but some extra info to the user would be helpful or what not. @mansam said he thought y'all wanted it to fall back to
application/json
if it doesn't exist though.How Reproducible
Always (Default)
Steps To Reproduce
No response
Environment
- OS:
Anything else?
No response
The text was updated successfully, but these errors were encountered: