Skip to main content
Module

x/tpy/mod.ts>TpyErr

🔑 A strongly typed Pylon API client.
Go to Latest
enum TpyErr
Re-export
import { TpyErr } from "https://deno.land/x/tpy@v1.0.0-pre-release/mod.ts";

A library specific enum for describing errors.

Members

DEPLOYMENT_NOT_FOUND

The deployment specified was not found. The API specifies this exactly like this:

could not find deployment
GUILD_NOT_FOUND

The guild specified was not found. The API specifies this exactly like this:

could not find guild
INTERNAL_SERVER_ERROR

Sometimes this happens when a request is made with the authorization header but it is invalid.

Input Response
(No Input) 403
Incorrect Credentials 500
Correct Input 200
METHOD_NOT_ALLOWED

The fetch method is not allowed.

MISSING_JSON_BODY

The fetch contents sent were did not have the required JSON body. The API specifies this exactly like this:

{
 "msg": "missing json body",
}
NO_ERR

Not an error, used for determining if the value is a non 0 value.

RESOURCE_NOT_FOUND

The URL resource returns a 404, this shouldn't happen on built in functions unless the API was updated. Make an issue on the Tpy repository so we can catch this error.

UNAUTHORIZED

This happens on two occasions:

  1. A request is made without an authorization header. (403)
  2. A request is made with the authorization header but it is invalid. (500)
Input Response
(No Input) 403
Incorrect Credentials 500
Correct Input 200

The API specifies this exactly like this:

{
 "msg": "missing json body",
}
UNIDENTIFIABLE

Tpy could not figure out what the error was, there is an error, but it isn't known. Make an issue on the Tpy repository so we can catch this error.