Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return an error response hsd-proxy can parse #49

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

RevCBH
Copy link

@RevCBH RevCBH commented Feb 23, 2021

Saw a noisy error in honeycomb about not being able to parse an error response, this should fix it.

For reference, the error: https://ui.honeycomb.io/namebase/datasets/namebase-web/result/y5thSyxt1K9

@@ -973,7 +977,7 @@ class HTTP extends Server {
return res.json(200, ns.getJSON(height, network));
}

return res.json(404, {success: true});
return notFound();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this originally have success: true?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just random JSON to parse, as far as I can tell. Nothing appears to expect that result, the only thing that calls it tries to extract a message field if the status code is non-200

@RevCBH RevCBH merged commit 701d4f4 into production-namebase Feb 23, 2021
@nodech nodech deleted the bennett/owns-name-error-msg branch January 16, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants