Skip to content

Commit

Permalink
coap-gateway: add more error key words for temporary errors
Browse files Browse the repository at this point in the history
jwt package doesn't propagate corretly error

golang/oauth2#635
  • Loading branch information
jkralik committed Mar 13, 2023
1 parent eb7fdbb commit 466482b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions coap-gateway/service/message/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func IsTempError(err error) bool {
strings.Contains(err.Error(), `write: broken pipe`),
strings.Contains(err.Error(), `request canceled while waiting for connection`),
strings.Contains(err.Error(), `authentication handshake failed`),
strings.Contains(strings.ToLower(err.Error()), `unavailable`),
strings.Contains(strings.ToLower(err.Error()), `temporarily`),
strings.Contains(strings.ToLower(err.Error()), `temporary`),
strings.Contains(err.Error(), context.DeadlineExceeded.Error()),
strings.Contains(err.Error(), context.Canceled.Error()):
return true
Expand Down

0 comments on commit 466482b

Please sign in to comment.