-
Notifications
You must be signed in to change notification settings - Fork 479
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
Forward status code and body from Pre-create http hook #236
Conversation
This uses |
This is looking good, thank you very much! I only have three comments:
|
But if the hook returned some JSON, then it was all messed up (because of the sentence pretended to the response). To sum up the state of this PR now:
I choose not to log the body inside tus, because:
This is my understanding of this feature, but I'm open to suggestions and critics! |
These changes allow the tusd server to properly return the status code from the pre-create hook to the client. This way client errors (e.g. 401) will not return 500. This prevents tus from repeating the request 5 times. These changes are from the first 2 commits of this PR: tus#236
Ok, sounds good 👍
I agree with that decision to keep the log but exclude the hook response body. The only thing I am a bit concerned about is the extension of the HTTPError interface. Since it's public (on purpose), some people may use it in their applications. But that's probably too few people, so I hope it should be fine. So the only missing part is documentation, isn't it? |
You are right, that this is actually a breaking change.
I've just updated it :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, amazing! Thank you very much 👍
Always a pleasure to contribute to this project (thanks to the helpful and reactive maintainers :-) |
Ah, that's very nice to hear :) Thank you |
Fix #170