diff --git a/graph/defs/README.md b/graph/defs/README.md index 000ac2a..6efad1e 100644 --- a/graph/defs/README.md +++ b/graph/defs/README.md @@ -5,5 +5,7 @@ ## 錯誤碼 - `NOT_FOUND`:找不到指定的實體。 -- `UNAUTHORIZED`:這個 API 需要認證或授權後才能運作。如果權限 (scope) 不足也會顯示這個錯誤。 -- `USER_VERIFIED`:使用者已經驗證過,不用重複驗證。目前只用於 `verifyRegistration` mutation。 +- `UNAUTHORIZED`:這個 API 需要認證或授權後才能運作。 +- `NOT_IMPLEMENTED`:這個 API 尚未實作,請先不要呼叫。 +- `FORBIDDEN`:使用者的權限 (scope) 不足以執行這個操作。 +- `INVALID_INPUT`:輸入有誤。 diff --git a/graph/defs/errors.go b/graph/defs/errors.go index 15d89c1..8c9696a 100644 --- a/graph/defs/errors.go +++ b/graph/defs/errors.go @@ -40,12 +40,6 @@ var ErrForbidden = GqlError{ Code: CodeForbidden, } -// ErrVerified is the error for "user already verified". -var ErrVerified = GqlError{ - Message: "user already verified", - Code: CodeUserVerified, -} - // ErrNotImplemented is the error for "not implemented". var ErrNotImplemented = GqlError{ Message: "not implemented", @@ -67,8 +61,6 @@ const ( CodeNotFound = "NOT_FOUND" // CodeUnauthorized is the error code for "require authentication". CodeUnauthorized = "UNAUTHORIZED" - // CodeUserVerified is the error code for "user already verified". - CodeUserVerified = "USER_VERIFIED" // CodeNotImplemented is the error code for "not implemented". CodeNotImplemented = "NOT_IMPLEMENTED" // CodeForbidden is the error code for "forbidden".