Skip to content

Commit

Permalink
SuzuError でリトライ対象のエラーを判別できるようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexa committed Mar 4, 2024
1 parent 4a3517c commit 7df8246
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ package suzu
type SuzuError struct {
Code int
Message string
Retry bool
}

func (e *SuzuError) Error() string {
return e.Message
}

func (e *SuzuError) IsRetry() bool {
return e.Retry
}

0 comments on commit 7df8246

Please sign in to comment.