-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle feature not licensed errors #8
Comments
gallagher command centre can have features not available per instance of the command centre, this makes all the features optional hence if one is not licensed then an exception is thrown by the client REFS #8
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 |
the discover endpoints drop the .href portion of the configuration this is infered by the common runtime code, making it uncessary for each endpoint to explicitly reference the href propeorty this also leads us to handing #8 properly as the core runtime can check for None type of the href property an OptionalHref type replaces the use of the Mixin for the discover endpoints additionally these are initialised to None and are overridden if the feature is avaialble on the command centre also see commentary in APIEndpoint._discover as to why we are sticking to initialising the configuration as the result of a function not an assignment to a class level variable REFS #5
Partially handled by #7 We still need to ensure that we handle this in user interfaces to provide meaningful information to the users. At an API level the developer is expected to catch and handle this. Leaving this open until documentation is completed. |
Gallagher API licenses features by the piece, if a feature isn't available the server responds with a
403
with the followingjson
:the API client should have the ability to handle these responses and throw an exception
The text was updated successfully, but these errors were encountered: