question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

export 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:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
CNBlackJcommented, Aug 8, 2017

yeah, thanks man! My mistake, I have fixed this problem.

1reaction
shahen94commented, Aug 8, 2017

it means this issue doesn’t related to Koa itself, something is wrong in your db, use try / catch to catch error object

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found