404 status
See original GitHub issueexport async function getPlaces(ctx, next) {
const { error, data } = await PlaceModel.getPlaces(ctx.query);
console.log(error, data);
if (error) {
return ctx.throw(422, error);
}
ctx.body = data;
}
Koa everytime sends 404 status and empty body, what i’m doing wrong ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
HTTP 404 - Wikipedia
In computer network communications, the HTTP 404, 404 not found, 404, 404 error, page not found or file not found error message is...
Read more >Error 404 not found - What does it mean & how to fix it! - IONOS
Something along the lines of '404 Not Found'. A 404 error is the standardized HTTP status code. The message is sent from the...
Read more >404 Not Found - HTTP - MDN Web Docs - Mozilla
A 404 status code only indicates that the resource is missing: not whether the absence is temporary or permanent.
Read more >Error 404: 4 Ways to Fix It - Hostinger
This HTTP status code means the requested page can't be found on the website server. It may indicate a flaw with a hosting...
Read more >HTTP/1.1: Status Code Definitions
This class of status code indicates a provisional response, consisting only of the Status-Line and ... the status code 404 (Not Found) can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yeah, thanks man! My mistake, I have fixed this problem.
it means this issue doesn’t related to Koa itself, something is wrong in your db, use
try / catch
to catch error object