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.
This PR adds an Exception for 402 Payment Required so rather than it returning a
ClientException
, it'll now returnPaymentRequiredException
. 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
After
Sister PR to https://github.com/Sammyjo20/saloon-docs/pull/71