softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
52 stars 64 forks source link

Enhance error handling #204

Open richardrandak opened 2 years ago

richardrandak commented 2 years ago

1) Some error responses don't follow the standard error JSON scheme. One example is expired token resulting in 401 and payload

{
    "message": "unauthorized"
}

2) Add error constants (codes or messages) to allow users to implement decision-making based on specific errors.

vanillajonathan commented 2 years ago

RFC 7807 might be of interest.