postmark-dotnet icon indicating copy to clipboard operation
postmark-dotnet copied to clipboard

Result and exception inconsistency

Open tomasr78 opened this issue 5 years ago • 2 comments

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.

tomasr78 avatar Feb 24 '20 10:02 tomasr78

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

hufsa avatar Oct 16 '23 22:10 hufsa

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

MariuszTrybus avatar Oct 18 '23 10:10 MariuszTrybus