503 for timeout errors (#98)

This commit is contained in:
David Colburn
2024-09-23 21:07:58 -04:00
committed by GitHub
parent d405a12ed7
commit 248dc5f10f
+1 -3
View File
@@ -133,8 +133,6 @@ func (e psrpcError) ToHttp() int {
switch e.code {
case OK:
return http.StatusOK
case Canceled, DeadlineExceeded:
return http.StatusRequestTimeout
case Unknown, MalformedResponse, Internal, DataLoss:
return http.StatusInternalServerError
case InvalidArgument, MalformedRequest:
@@ -155,7 +153,7 @@ func (e psrpcError) ToHttp() int {
return http.StatusRequestedRangeNotSatisfiable
case Unimplemented:
return http.StatusNotImplemented
case Unavailable:
case Canceled, DeadlineExceeded, Unavailable:
return http.StatusServiceUnavailable
case Unauthenticated:
return http.StatusUnauthorized