Error Handling
Any error returned by the Novant API will raise a
NovantErr exception. The exception exposes two attributes:
code for the HTTP status code and message for
a human-readable description of the error.
from novant import NovantClient, NovantErr
client = NovantClient(api_key="ak_xxx")
try:
client.project()
except NovantErr as e:
print(e.code) # ex: 403
print(e.message) # ex: "Invalid API key"See API Errors for a full list of error codes.