I have a generic REST service layer written to Java modules which can be plugged in. If any of the desired operation is not supported by a Module (GET/POST/PUT/DELETE of a Resource), the module throws java.lang.UnsupportedOperationException or an equivalent Exception Type that I have.
So, can I return a HTTP 501 Error Code to the client in this case?