Handle feature not licensed errors
Closed this issue · 2 comments
devraj commented
Gallagher API licenses features by the piece, if a feature isn't available the server responds with a 403
with the following json
:
HTTP/1.1 403 Forbidden
Cache-Control: no-cache
Content-Length: 34
Content-Type: application/json; charset=utf-8
Date: Sat, 10 Jun 2023 05:08:12 GMT
{
"message": "Feature not licensed"
}
the API client should have the ability to handle these responses and throw an exception
devraj commented
While experimenting with responses to implement #5 I found that the discovery endpoint does not return an endpoint for features not licensed by the instance.
We should depend on the responses being set to None
for the particular endpoints and an exception being thrown by the client.