20210915 - 两种情况两种状态码
2021-09-15 00:00:00
1 | app.get('/api/notes/:id', (request, response) => { |
之所以分两种状态码,是因为有两种错误。。
下面这个应该是属于invalid id吧,猜测判断是否valid是根据id的长度来的,如果长度匹配就报404,长度不匹配报400
关于400状态码
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.