Skip to content

Commit

Permalink
chore: doc populateAbortErrorResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Jun 5, 2022
1 parent bac20e8 commit d1832eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/proxy/src/util/responseHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export function populateRatelimitErrorResponse(res: ServerResponse, error: RateL
res.setHeader('Retry-After', error.timeToReset / 1000);
}

/**
* Populates a server response with data relevant for a time out
* @param res The sever response to populate
*/
export function populateAbortErrorResponse(res: ServerResponse): void {
res.statusCode = 504;
res.statusMessage = 'Upstream timed out';
Expand Down

0 comments on commit d1832eb

Please sign in to comment.