OSDN Git Service

Merge: merge pro
[bytom/Byone.git] / src / utils / errors / Error.js
index a604a14..60ab45f 100644 (file)
@@ -32,8 +32,12 @@ export default class Error {
     return new Error(ErrorTypes.TYPE_DISAUTH, `The current domain is no auth, it can't be disauth`, ErrorCodes.TYPE_DISAUTH)
   }
 
+  static forbidden() {
+    return new Error(ErrorTypes.FORBIDDEN, `Authorization denied`, ErrorCodes.FORBIDDEN)
+  }
+
   static promptClosedWithoutAction(){
-    return new Error(ErrorTypes.PROMPT_CLOSED, "The user closed the prompt without any action.", ErrorCodes.TIMED_OUT)
+    return new Error(ErrorTypes.PROMPT_CLOSED, "The user closed the prompt without any action.", ErrorCodes.FORBIDDEN)
   }
 
   static signatureError(_type, _message){