HTTP 501 for java.lang.UnsupportedOperationException -


I have a JavaScript Rest Service Layer that has been written to the Java module which can be plugged in. If any desired operation is not supported by a module (GET / Post / Pet / Delete of the resort), the module java.lang throws. I have unsupported exceptions or the equivalent exception type.

So, I have a HTTP 501 error code in this case to the customer?

In this case, you should not use the 405 method (all quotes):

A resource was requested using a request method supported by that resource; For example, use GET on a form for which data can be submitted through POST or it is necessary to use PUT only on reading resources.

501 is appropriate:

The server does not recognize the request method , or the request in it There is no ability to fulfill

But I keep it for operations which you plan to apply in the near future.

Comments