fn: handle client connection close errors (#1196)

This commit is contained in:
Tolga Ceylan
2018-09-05 16:56:31 -07:00
committed by GitHub
parent 246c353f9a
commit 35d04cae6d
2 changed files with 14 additions and 4 deletions

View File

@@ -18,6 +18,11 @@ var (
code: http.StatusBadRequest,
error: errors.New("Invalid JSON"),
}
ErrClientCancel = err{
// The special custom error code to close connection without any response
code: 444,
error: errors.New("Client cancelled context"),
}
ErrCallTimeout = err{
code: http.StatusGatewayTimeout,
error: errors.New("Timed out"),