Skip to content

Commit

Permalink
Implement GSP-127: Add ServiceInternal and RequestThrottled Errors (#138
Browse files Browse the repository at this point in the history
)
  • Loading branch information
junaire authored Jul 5, 2021
1 parent 29b49b0 commit fc8847b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/go-storage/internal/handling-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ if err != nil {

n, err := store.Read(path, &buf)
if err != nil {
if errors.Is(err, services.ErrServiceInternal) {
// handle ErrServiceInternal
// (global error)
return
}
if errors.Is(err, services.ErrRequestThrottled) {
// handle ErrRequestThrottled
// (global error)
return
}
if errors.Is(err, services.ErrObjectNotExist) {
// handle ErrObjectNotExist
// (global error)
Expand Down Expand Up @@ -103,6 +113,8 @@ Error Code|Fine-grained Error Type
-----|-----
`ErrObjectNotExist`|N/A
`ErrPermissionDenied`|N/A
`ErrServiceInternal` |N/A
`ErrRequestThrottled` |N/A

## Top-level Errors

Expand Down

1 comment on commit fc8847b

@vercel
Copy link

@vercel vercel bot commented on fc8847b Jul 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.