Skip to content

Commit

Permalink
example(@nestjs) fix HttpExceptionFilter example (missing status)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 21, 2018
1 parent a8803fd commit a87eee0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export class HttpExceptionFilter implements ExceptionFilter {
const ctx = host.switchToHttp();
const response = ctx.getResponse();
const request = ctx.getRequest();
const statusCode = exception.getStatus();

response.status(status).json({
statusCode: exception.getStatus(),
response.status(statusCode).json({
statusCode,
timestamp: new Date().toISOString(),
path: request.url,
});
Expand Down

0 comments on commit a87eee0

Please sign in to comment.