Skip to content
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

Unmarshal request body fail should not panic #6

Open
tnclong opened this issue Aug 22, 2017 · 1 comment
Open

Unmarshal request body fail should not panic #6

tnclong opened this issue Aug 22, 2017 · 1 comment

Comments

@tnclong
Copy link
Contributor

tnclong commented Aug 22, 2017

Content-Type: application/json

{
	"codes": ["5S63204"
}
POST /api/ja/proto.ProductService/GetProducts -> 500 Internal Server Error (panic: invalid character '}' after array element)

Maybe 422 is more better?

@bodhi
Copy link
Member

bodhi commented Aug 22, 2017

400 Bad Request

Client said they were sending JSON (Content-Type header), but they didn't send valid JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants