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

fix: don't include error in response #2178

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

stuartwdouglas
Copy link
Collaborator

Also make sure we log errors related to HTTP processing.

closes #2162

@stuartwdouglas stuartwdouglas requested review from a team and worstell and removed request for a team July 26, 2024 01:18
@@ -18,6 +18,8 @@ import (
"github.com/TBD54566975/ftl/internal/model"
)

const internalServerError = "Internal Server Error"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An open question is if we want to include this message or just an empty string.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const internalServerError = "Internal Server Error"
const internalServerError = http.StatusText(http.StatusInternalServerError)

(or inline that call elsewhere)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think that compiles, I would need to inline it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although it did make me realize I am sending the wrong message in some places

Copy link
Collaborator

Choose a reason for hiding this comment

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

Make it var .. to compile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I inlined it as some of the messages were for different response codes

@ftl-robot ftl-robot mentioned this pull request Jul 26, 2024
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

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

Noice

backend/controller/ingress/handler.go Outdated Show resolved Hide resolved
Also make sure we log errors related to HTTP processing.

closes #2162
@stuartwdouglas stuartwdouglas merged commit aa56832 into main Jul 26, 2024
59 checks passed
@stuartwdouglas stuartwdouglas deleted the stuartwdouglas/2162 branch July 26, 2024 05:58
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.

FTL http ingress error handling (response payloads)
2 participants