osu-api-v2-js
    Preparing search index...

    Class APIError

    If the API throws an error, it should always be an APIError!

    Index

    Constructors

    • Parameters

      • message: string

        The reason why things didn't go as expected

      • server: string

        The server to which the request was sent

      • method: "get" | "post" | "put" | "delete"

        The method used for this request (like "get", "post", etc...)

      • endpoint: (string | number)[]

        The type of resource that was requested from the server

      • parameters: undefined | { [k: string]: any }

        The filters that were used to specify what resource was wanted

      • Optionalstatus_code: number

        The status code that was returned by the server, if there is one

      • Optionaloriginal_error: Error

        The error that caused the api to throw an APIError in the first place, if there is one

      Returns APIError

    Properties

    endpoint: (string | number)[]

    The type of resource that was requested from the server

    message: string

    The reason why things didn't go as expected

    method: "get" | "post" | "put" | "delete"

    The method used for this request (like "get", "post", etc...)

    original_error?: Error

    The error that caused the api to throw an APIError in the first place, if there is one

    parameters: undefined | { [k: string]: any }

    The filters that were used to specify what resource was wanted

    server: string

    The server to which the request was sent

    status_code?: number

    The status code that was returned by the server, if there is one