class pynetbox.core.query.RequestError(req)

Basic Request Exception

More detailed exception that returns the original requests object for inspection. Along with some attributes with specific details from the requests object. If return is json we decode and add it to the message.

>>> try:
...   nb.dcim.devices.create(name="destined-for-failure")
... except pynetbox.RequestError as e:
...   print(e.error)
class pynetbox.core.query.ContentError(req)

Content Exception

If the API URL does not point to a valid NetBox API, the server may return a valid response code, but the content is not json. This exception is raised in those cases.

class pynetbox.core.query.AllocationError(req)

Allocation Exception

Used with available-ips/available-prefixes when there is no room for allocation and NetBox returns 204 No Content (before NetBox 3.1.1) or 409 Conflict (since NetBox 3.1.1+).