You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: /v1/chatrooms/myroomname?servicename=invalid will return an HTTP/500 and put some errors in the logs
2022.01.01 21:37:53 INFO [Jetty-QTP-AdminConsole-183]: org.jivesoftware.openfire.plugin.rest.controller.MUCRoomController - Get the chat room: test999
2022.01.01 21:37:53 ERROR [Jetty-QTP-AdminConsole-183]: org.jivesoftware.openfire.container.PluginServlet - null
java.lang.NullPointerException: null
at org.jivesoftware.openfire.plugin.rest.controller.MUCRoomController.getChatRoom(MUCRoomController.java:101) ~[?:?]
at org.jivesoftware.openfire.plugin.rest.service.MUCRoomService.getMUCRoomJSON2(MUCRoomService.java:38) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
…ences
When requests are made against MUC services or rooms that do not exist (but are expected to), then the old implementation would return a HTTP 500 "Internal Server Error" response.
This commit explicitly checks if the MUC service/room that is used in the request exist, and return HTTP 404 "Not Found" when that's not the case.
I've also included more annotations that will cause Swagger to generate a more complete list of errors that are returned for MUC services.
this fixesigniterealtime#74
…ences
When requests are made against MUC services or rooms that do not exist (but are expected to), then the old implementation would return a HTTP 500 "Internal Server Error" response.
This commit explicitly checks if the MUC service/room that is used in the request exist, and return HTTP 404 "Not Found" when that's not the case.
I've also included more annotations that will cause Swagger to generate a more complete list of errors that are returned for MUC services.
this fixes#74
Example:
/v1/chatrooms/myroomname?servicename=invalid
will return an HTTP/500 and put some errors in the logsLooks to be this unsafe method chaining
https://github.com/igniterealtime/openfire-restAPI-plugin/blob/01cf5bd/src/java/org/jivesoftware/openfire/plugin/rest/controller/MUCRoomController.java#L114-L115
I'm not sure whether this should return HTTP/404 because the service isn't found or HTTP/400 because a valid service name wasn't provided.
The text was updated successfully, but these errors were encountered: