Use the ServiceFailure to replace the InvalidRequest when it is the read-only mode (CN throws the exception).
Add a class to determine if the metacat is in the readonly mode.