Exceptions

This document outlines all the exception types of this package.

exception skywrapper.exceptions.SkywrapperException[source]

Used as the base exception for errors that are specific to this package.

This exception may be caught to handle most exceptions thrown from this library.

exception skywrapper.exceptions.HTTPException(response, status_code, response_message)[source]

Thrown when an HTTP operation fails. Also a base class for other HTTP related errors.

You should catch more specific errors instead of catching this one when suitable.

Subclass of SkywrapperException

Variables
Parameters
  • response (Union[requests.models.Response, aiohttp.client_reqrep.ClientResponse]) –

  • status_code (int) –

  • response_message (Union[dict, str]) –

exception skywrapper.exceptions.MojangException(response, status_code, response_message)[source]

Used as the base error for most Mojang API related errors.

Subclass of HTTPException

Parameters
  • response (Union[requests.models.Response, aiohttp.client_reqrep.ClientResponse]) –

  • status_code (int) –

  • response_message (Union[dict, str]) –

exception skywrapper.exceptions.InvalidType[source]

Raises when an incompatible type is used.

exception skywrapper.exceptions.NotFoundException(response, status_code, response_message)[source]

Thrown when an HTTP request returns a 404 status code.

Subclass of HTTPException

Parameters
  • response (Union[requests.models.Response, aiohttp.client_reqrep.ClientResponse]) –

  • status_code (int) –

  • response_message (Union[dict, str]) –

exception skywrapper.exceptions.UnauthorizedException(response, status_code, response_message)[source]

Thrown when an HTTP request returns a 403 status code

Subclass of HTTPException

Parameters
  • response (Union[requests.models.Response, aiohttp.client_reqrep.ClientResponse]) –

  • status_code (int) –

  • response_message (Union[dict, str]) –

Exception hierarchy