Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions graph/defs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
## 錯誤碼

- `NOT_FOUND`:找不到指定的實體。
- `UNAUTHORIZED`:這個 API 需要認證或授權後才能運作。如果權限 (scope) 不足也會顯示這個錯誤。
- `USER_VERIFIED`:使用者已經驗證過,不用重複驗證。目前只用於 `verifyRegistration` mutation。
- `UNAUTHORIZED`:這個 API 需要認證或授權後才能運作。
- `NOT_IMPLEMENTED`:這個 API 尚未實作,請先不要呼叫。
- `FORBIDDEN`:使用者的權限 (scope) 不足以執行這個操作。
- `INVALID_INPUT`:輸入有誤。
8 changes: 0 additions & 8 deletions graph/defs/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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".
Expand Down