rankade.models.Error

Module Contents

Classes

Error

Represents a single error returned by the Rankade API.

Errors

Represents a list of error objects returned by the Rankade server. Individual error objects returned by the server can be accessed in the same way as a regular list.

API

class Error[source]

Bases: rankade.models.Base.RankadeObject

Represents a single error returned by the Rankade API.

See also

List of codes & messages returned can be found in the Rankade API documentation. - Error Responses - Quota and Limits - Get Auth - Post Players Player - Post Matched Match

Parameters:
  • message (str) – Error message returned by the server.

  • code (str) – Error code of returned error.

code: str = None

Error code in returned error. If first character will tell you what type of error it is: - A: Auth - Q: Quota - M: Match Validation

message: str = None

Error message returned by the server.

class Errors(initlist=None)[source]

Bases: rankade.models.Base.ResultList[rankade.models.Error.Error]

Represents a list of error objects returned by the Rankade server. Individual error objects returned by the server can be accessed in the same way as a regular list.

Parameters:
  • url (str) – Queried URL that provided the error response.

  • verb (str) – HTTP method used in query (GET, POST, etc)

  • status (int) – HTTP status code returned with the error response.

  • data (MutableMapping[str, Any]) – List of errors returned in json dict.

Note

I have only ever received a single error. As the spec is ambiguous this class caters for more than one error.

Initialization

_content_class: ClassVar[Type[RankadeObject]] = None
url: str = 'field(...)'

Queried url that provided the error response.

verb: str = 'field(...)'

HTTP method used in query (GET, POST, etc)

status: int = 'field(...)'

HTTP status code returned with the error response.