mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Support "Task timed out" warnings as HTTP 504-errors
Currently if Lambda functions have a timeout then you will not see any errors in Cloudwatch, while the user gets a 200 http response code with `{ errorMessage: 'Task timed out in 10.0 s'}`.
This change will show 5XX errors in Cloudwatch.
To support this I need to copy all the default patterns in `serverless.yml` per function, so therefore I think this need to be a default setting, while this is not caused by the Serverless(/our) code but by AWS Lambda itself.
This commit is contained in:
parent
7d2b79b910
commit
660e0b3a8f
@ -29,7 +29,7 @@ const DEFAULT_STATUS_CODES = {
|
||||
pattern: '[\\s\\S]*\\[502\\][\\s\\S]*',
|
||||
},
|
||||
504: {
|
||||
pattern: '[\\s\\S]*\\[504\\][\\s\\S]*',
|
||||
pattern: '([\s\S]*\[504\][\s\S]*)|(^[Task timed out].*)',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user