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

Improve error reporting to server consumers #29

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

nbrahms
Copy link
Contributor

@nbrahms nbrahms commented Sep 20, 2024

Previously we emmitted error codes without any error data. Instead, actually transmit received errors to the Braekhus server consumer.

Previously we emmitted error codes without any error data. Instead,
actually transmit received errors to the Braekhus server consumer.
@nbrahms nbrahms self-assigned this Sep 20, 2024
@@ -40,7 +40,7 @@ export const httpProxyApp = (
const matches = PATH_REGEXP.exec(req.path);
logger.debug({ matches }, "path matches");
if (matches === null || matches.length !== 3) {
res.sendStatus(400);
res.status(404).json({ error: "Invalid path format" });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make this more REST-compatible, by treating the location as a resource reference.

@nbrahms nbrahms merged commit c1b796c into main Sep 20, 2024
1 check passed
@nbrahms nbrahms deleted the nathan/improve-error-reporting branch September 20, 2024 18:59
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.

3 participants