workos-node
workos-node copied to clipboard
GenericServerException
Good morning,
I'm working on integrating WorkOS with my custom UI and I have some questions around errors. I have went through and seen that GenericServerException is exported and can be used but the real issue is the rawData object that is returned. This seems to differ per what error occurs and there is no documentation that I can find on it.
Is there any way to get a list of the possible codes and format rawData can return? For instance organization_selection_required and invalid_credentials return different.
If not I feel like people would have to experiment with all possible errors to map it ourselves and then hope the WorkOS API doesn't change the format.