expressjs / api-error-handler

Express error handlers for JSON APIs
MIT License
101 stars 23 forks source link

Add exposeAdditionalProperties option #8

Open LinusU opened 6 years ago

LinusU commented 6 years ago

see #7 for motivation

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling fe4ea9a12acff4f0a9f667f8db02f3ac812a1819 on LinusU:expose-additional-properties into df765a50c0c1de4fdbe4ce9cef2d910df4d8ba3e on expressjs:master.

kilhage commented 6 years ago

+1

LinusU commented 5 years ago

ping @jonathanong, what do you think about this? ☺️

gillesdemey commented 5 years ago

I think it would be useful to specify either a truthy/falsy value or an array of properties to whitelist.

Some packages add additional error properties that you might not want to propagate to the user.