You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an exception occurs, a NotifyClientException is thrown, but its content is a plain string as outlined above. The string contains the information from the documentation, but in a very unintuitive way, making it difficult to parse. For example, here is the string from the 'message' field one one such case:
Status code 400. Error: {"errors":[{"error":"ValidationError","message":"email_address Not a valid email address"}],"status_code":400}, Exception: Status code 400. The following errors occured [{"error": "ValidationError", "message": "email_address Not a valid email address"}]
I would much rather work with just the following, since it is much easier to parse, or maybe even incorporate those as fields in the NotifyClientException class.: {"errors":[{"error":"ValidationError","message":"email_address Not a valid email address"}],"status_code":400}
The text was updated successfully, but these errors were encountered:
notifications-net-client/src/GovukNotify/Client/BaseClient.cs
Lines 118 to 129 in 358238c
When an exception occurs, a NotifyClientException is thrown, but its content is a plain string as outlined above. The string contains the information from the documentation, but in a very unintuitive way, making it difficult to parse. For example, here is the string from the 'message' field one one such case:
Status code 400. Error: {"errors":[{"error":"ValidationError","message":"email_address Not a valid email address"}],"status_code":400}, Exception: Status code 400. The following errors occured [{"error": "ValidationError", "message": "email_address Not a valid email address"}]
I would much rather work with just the following, since it is much easier to parse, or maybe even incorporate those as fields in the NotifyClientException class.:
{"errors":[{"error":"ValidationError","message":"email_address Not a valid email address"}],"status_code":400}
The text was updated successfully, but these errors were encountered: