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

Make HTTP handler non-throwing. Application should do error handling #462

Merged
merged 5 commits into from
May 30, 2024

Conversation

adam-fowler
Copy link
Member

No description provided.

@adam-fowler adam-fowler requested a review from Joannis May 23, 2024 15:05
Base automatically changed from error-headers to main May 28, 2024 13:09
@@ -115,6 +115,7 @@ extension ApplicationProtocol {
response = httpError.response(allocator: channel.allocator)
default:
// this error has not been recognised
context.logger.debug("Error: \(error)")
Copy link
Contributor

Choose a reason for hiding this comment

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

Given recent discussions on slack between Gwynne and Johannes, I think we should consider adding the error as metadata, clarifying the debug message, and make the main message a constant string.

Copy link
Member Author

Choose a reason for hiding this comment

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

My bad. I meant to do that. I remember a long conversation when swift-log was first being setup which said pretty much the same thing

@adam-fowler adam-fowler merged commit 055acab into main May 30, 2024
4 of 5 checks passed
@adam-fowler adam-fowler deleted the server-non-throwing-handler branch May 30, 2024 08:25
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.

None yet

2 participants