Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ResponseContentTypeError.js « Exception « src - git.mdns.eu/nextcloud/passwords-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5594343760c8fc6504fe6db077d73ec9c3d7cfaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export default class ResponseContentTypeError extends Error {

    /**
     * @returns {String}
     */
    get name() {
        return 'ResponseContentTypeError';
    }

    /**
     * @returns {Response}
     */
    get response() {
        return this._response;
    }

    /**
     * @param {String} expectedType
     * @param {String} actualType
     * @param {Response} response
     */
    constructor(expectedType, actualType, response) {
        super(`Expected ${expectedType}, got ${actualType}`);

        this._response = response;
    }
}