Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise meaningful error when IDP descriptor can’t be found #716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eriklovmo
Copy link

@eriklovmo eriklovmo commented Jul 22, 2024

Here, raise a more meaningful error when the identity provider metadata does not contain an IDP descriptor, or no IDP descriptor matching the value of the optional entity_id option.

Raising an ArgumentError implies that some invariants of the method failed, when in fact this error occurs when arguments are superficially valid but parsing fails due to "business logic". Additionally, by using namespaced, specific errors we make the API easier and safer for user code.

@eriklovmo eriklovmo changed the title Raise meaningful error when IDP descriptor cant be found Raise meaningful error when IDP descriptor can’t be found Jul 22, 2024
@johnnyshields
Copy link
Collaborator

Rather than doing this as a one-off, it would be better to look at all errors RubySaml generates and make them into proper classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants