You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dreamorosi
added
metrics
This item relates to the Metrics Utility
and removed
triage
This item has not been triaged by a maintainer, please wait
labels
Sep 19, 2022
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
dreamorosi
changed the title
Bug (metrics): throws on empty metrics even if told not to in middy middleware
Bug: throws on empty metrics even if told not to in middy middleware
Nov 14, 2022
Bug description
When constructing the middleware like:
... I would expect it to not throw an exception, but it does. It just doesn't on the value
undefined
. It is slightly confusing...Expected Behavior
Not throw exception.
Current Behavior
Throws exception
Possible Solution
Explicitly test for
undefined
andfalse
.Steps to Reproduce
middy(handler).use(logMetrics(metrics, { throwOnEmptyMetrics: false }));
Environment
Related issues, RFCs
The text was updated successfully, but these errors were encountered: