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

Result and exception inconsistency #77

Open
tomasr78 opened this issue Feb 24, 2020 · 2 comments
Open

Result and exception inconsistency #77

tomasr78 opened this issue Feb 24, 2020 · 2 comments

Comments

@tomasr78
Copy link

tomasr78 commented Feb 24, 2020

The client.SendMessageAsync method returns Status enum

Unknown = -1, // 0xFFFFFFFF
Success = 0,
UserError = 1,
ServerError = 2,

but it also throws exception PostmarkValidationException. So this is a big inconsistency. If you choose to return status from a method then follow that path or if you choose to throw an exception then do that for all statuses.

The enum Status has UserError and ServerError, move PostmarkValidationException to one of these statuses and remove PostmarkValidationException, this is my suggestion.

@hufsa
Copy link

hufsa commented Oct 16, 2023

Any plans on addressing this or should we spend time working around it?

@MariuszTrybus
Copy link
Contributor

There are no plans to change the behaviour at the moment.

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

No branches or pull requests

3 participants