Waziup / Socialbackend

1 stars 3 forks source link

HTTP code in case of duplicate message #16

Open cdupont opened 6 years ago

cdupont commented 6 years ago

Currently if I call the social backend with twice the same message, it gives a 500 error code. In the log there is:

2017-12-07 14:22:18,238 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /api/v1/domains/waziup/socials/: org.jboss.resteasy.spi.UnhandledException: c
om.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: Duplicate status message (code 506, subcode 1455006)

It make sense to forbid sending twice the same message. But the error code should be 409 in this case (with a "duplicate message" body).

pandaconstantin commented 6 years ago

Are you still experiencing this issue ?

cdupont commented 6 years ago

Did you push some code?