All files / exceptions TooManyRequestsException.js

63.63% Statements 7/11
100% Branches 1/1
0% Functions 0/1
63.63% Lines 7/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 111x 1x 1x 1x 1x 1x         1x
import {ReasonPhrases, StatusCodes} from "http-status-codes";
import {isSet} from "node:util/types";
import i18n from "i18n";
 
export default class TooManyRequestsException {
    constructor(message = null) {
        this.code = ReasonPhrases.TOO_MANY_REQUESTS;
        this.status = StatusCodes.TOO_MANY_REQUESTS;
        this.message = isSet(message) ? message : i18n.__('server.error.tooManyRequests');
    }
}