Currently, the backend returns "internal server error" even if there was not actually a problem on the server side. This PR tries to improve error handling in KeyConjurer so that a user gets more info in errors returned by KeyConjurere.
Main updates:
Introduced standard errors for the Okta client. The client now inspects errors from Okta a bit deeper and wraps them into one of the standard errors.
Introduced standard errors for authentication providers. The Okta provider now also inspects Okta's errors a bit deeper and returns one of the standard errors.
When getting SAML assertion, the lambda handler now checks errors from the authentication provider to pick up a right error code.
Thanks for the review @trinitroglycerin ! The comments make sense to me. In fact, there are a few more functions that should not be exported. I've addressed your comments.
Currently, the backend returns "internal server error" even if there was not actually a problem on the server side. This PR tries to improve error handling in KeyConjurer so that a user gets more info in errors returned by KeyConjurere.
Main updates: