mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: error handling updates (#1337)
* docker-pull timeout is now a 504 which classifies it as a service error. Avoid using 503 to make sure LB does not retry. * Only applicable to detached mode, a timeout on LB is now a ErrServiceReservationFailure (500). In detached mode, this is unlikely to make it back to a client and it is mostly for documentation/metrics purposes. * For Triggers, avoid scrubbing service code.
This commit is contained in:
@@ -37,7 +37,7 @@ var (
|
||||
error: errors.New("Timed out - server too busy"),
|
||||
}
|
||||
ErrDockerPullTimeout = err{
|
||||
code: http.StatusServiceUnavailable,
|
||||
code: http.StatusGatewayTimeout,
|
||||
error: errors.New("Docker pull timed out"),
|
||||
}
|
||||
ErrContainerInitTimeout = err{
|
||||
@@ -188,7 +188,10 @@ var (
|
||||
code: http.StatusInternalServerError,
|
||||
error: errors.New("Unable to find the call handle"),
|
||||
}
|
||||
|
||||
ErrServiceReservationFailure = err{
|
||||
code: http.StatusInternalServerError,
|
||||
error: errors.New("Unable to service the request for the reservation period"),
|
||||
}
|
||||
ErrContainerInitFail = err{
|
||||
code: http.StatusBadGateway,
|
||||
error: errors.New("container failed to initialize, please ensure you are using the latest fdk / format and check the logs"),
|
||||
|
||||
Reference in New Issue
Block a user