Skip to content

Commit

Permalink
errors type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vikulin committed Jun 16, 2024
1 parent b4aaa48 commit b7d5fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/restapi/rest_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ func applyKeyParameterized(w http.ResponseWriter, r *http.Request, fn func(key s
result, err := fn(cnt[4])
if err == nil {
WriteJson(w, r, result)
} else if errors.As(err, &core.ErrTimeout) {
} else if errors.Is(err, core.ErrTimeout) {
http.Error(w, "Node inaccessible", http.StatusBadGateway)
} else {
http.Error(w, err.Error(), http.StatusBadRequest)
Expand Down

0 comments on commit b7d5fb8

Please sign in to comment.