Skip to content

Commit

Permalink
Merge pull request #14 from adamjosefus/development
Browse files Browse the repository at this point in the history
Update RouterList.ts
  • Loading branch information
adamjosefus authored Feb 19, 2022
2 parents c983608 + 6127e8d commit 21d7da7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routers/RouterList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ export class RouterList implements IRouter {
}


async getErrorReponse(req: Request, status: Status | number): Promise<Response> {
async getErrorReponse(status: Status | number, req: Request, params: Record<string, string> = {}): Promise<Response> {
const serveResponse = this.#errors.get(status);
const phrase = getReasonPhrase(status);

if (serveResponse) {
return await serveResponse(req, {
status: status.toString(),
phrase
phrase,
...params,
});

} else {
Expand Down

0 comments on commit 21d7da7

Please sign in to comment.