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

Use better HTTP Status code than 500 when resource already exists. #35

Closed
guusdk opened this issue Dec 21, 2019 · 1 comment
Closed

Use better HTTP Status code than 500 when resource already exists. #35

guusdk opened this issue Dec 21, 2019 · 1 comment

Comments

@guusdk
Copy link
Member

@guusdk guusdk commented Dec 21, 2019

As reported on https://discourse.igniterealtime.org/t/openfire-returning-500-internal-server-erro-when-user-already-exist/84217

I’m getting 500 INTERNAL SERVER ERROR while trying to create user via REST API.
Later I found that User ID already exist. Is there any other way to get different response when user already exist (instead of 500 internal server error)?

Openfire 4.3.2
REST API 1.3.7

@Redor

This comment has been minimized.

Copy link
Contributor

@Redor Redor commented Jan 8, 2020

I introduced a better handling for such errors (exactly that case is also fixed) in https://github.com/igniterealtime/openfire-restAPI-plugin/releases/tag/1.3.10

@Redor Redor closed this Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.