Commit f5c4a44
Robert Jackson
Ensure 404's receive the proper response code.
Prior to this change, requesting a URL that did not exist in the
app resulted in a 500 response code (which is not correct).
When we encounter an unrecognized URL we should simply call `next`
and allow any downstream middlewares to handle the request. If
nothing handles the request, Express will set the status code
to 404 on its own.1 parent f23226d commit f5c4a44
2 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
| 65 | + | |
63 | 66 | | |
64 | | - | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
0 commit comments