scimmyjs / scimmy

SCIM m(ade eas)y - SCIM 2.0 library for NodeJS
https://scimmyjs.github.io
MIT License
41 stars 10 forks source link

Egress list errors aren't catch and turned into SCIMMY errors #43

Closed twk3 closed 1 month ago

twk3 commented 2 months ago

When egress isn't passed an id, it doesn't have a try catch converting any exceptions to the SCIMMY Error type.

But it does when an id is passed. It would be nicer to catch and return scim type errors in both cases: https://github.com/scimmyjs/scimmy/blob/8a25458fbc122e27d6b65cf52a91bdd0d140a62d/src/lib/resources/user.js#L86

sleelin commented 1 month ago

Hi @twk3, apologies for the delay in responding to this issue. I have now merged a PR that wraps the egress handler call for list responses in the same catch and throw logic as used in requests for specific resources, and the change will be available in the next release (v1.2.4).

Thanks, Sam