fn: enforce container/FDK contract in dispatch (#1314)

1) FDK returned 200/502/504 codes now handled.
2) Container init timeout is now default to 5 seconds.
This commit is contained in:
Tolga Ceylan
2018-11-20 13:50:53 -08:00
committed by GitHub
parent e40816bd0e
commit 69131420bf
5 changed files with 76 additions and 67 deletions

View File

@@ -138,6 +138,14 @@ var (
code: http.StatusBadGateway,
error: fmt.Errorf("error receiving function response"),
}
ErrFunctionFailed = err{
code: http.StatusBadGateway,
error: fmt.Errorf("function failed"),
}
ErrFunctionInvalidResponse = err{
code: http.StatusBadGateway,
error: fmt.Errorf("invalid function response"),
}
ErrRequestContentTooBig = err{
code: http.StatusRequestEntityTooLarge,
error: fmt.Errorf("Request content too large"),