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

Add PaymentRequired Exception #441

Merged
merged 2 commits into from
Aug 3, 2024

Conversation

JonPurvis
Copy link
Contributor

@JonPurvis JonPurvis commented Jul 28, 2024

This PR adds an Exception for 402 Payment Required so rather than it returning a ClientException, it'll now return PaymentRequiredException. I'm working with an API that returns this status code and I'd like to be able to handle these in a certain way, this status also seems to be getting more popular these days, so I think it makes sense for it to now have it's own Exception.

Before
Screenshot 2024-07-28 at 23 48 51

After
Screenshot 2024-07-28 at 23 48 04

Sister PR to Sammyjo20/saloon-docs#71

@JonPurvis JonPurvis changed the title add exception for payment required Add PaymentRequired Exception Jul 28, 2024
Copy link
Member

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome PR, thanks Jon! ⭐

@Sammyjo20 Sammyjo20 merged commit f33db6e into saloonphp:v3 Aug 3, 2024
14 checks passed
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.

3 participants