Revision 9481
Added by Jing Tao over 8 years ago
MNResourceHandler.java | ||
---|---|---|
674 | 674 |
ReadOnlyChecker checker = new ReadOnlyChecker(); |
675 | 675 |
boolean isReadOnlyMode = checker.isReadOnly(); |
676 | 676 |
if(isReadOnlyMode) { |
677 |
throw new InvalidRequest("1334", "The Metacat member node is on the read-only mode and your request can't be fulfiled. Please try again later.");
|
|
677 |
throw new ServiceFailure("1333", ReadOnlyChecker.DATAONEERROR);
|
|
678 | 678 |
} |
679 | 679 |
|
680 | 680 |
//final long serialVersion = 0L; |
... | ... | |
976 | 976 |
ReadOnlyChecker checker = new ReadOnlyChecker(); |
977 | 977 |
boolean isReadOnlyMode = checker.isReadOnly(); |
978 | 978 |
if(isReadOnlyMode) { |
979 |
throw new InvalidRequest("2153", "The Metacat member node is on the read-only mode and your request can't be fulfiled. Please try again later.");
|
|
979 |
throw new ServiceFailure("2151", ReadOnlyChecker.DATAONEERROR);
|
|
980 | 980 |
} |
981 | 981 |
|
982 | 982 |
// somewhat unorthodox, but the call is asynchronous and we'd like to return this info sooner |
Also available in: Unified diff
Use the ServiceFailure to replace the InvalidRequest when it is the read-only mode (CN throws the exception).