postmark-dotnet
postmark-dotnet copied to clipboard
Result and exception inconsistency
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.
Any plans on addressing this or should we spend time working around it?
There are no plans to change the behaviour at the moment.