Request

class pynetbox.core.query.RequestError(message)

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.

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

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(message)

Allocation Exception

Used with available-ips/available-prefixes when there is no room for allocation and NetBox returns 204 No Content.