-
Notifications
You must be signed in to change notification settings - Fork 9
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
RFC 7807 Compliance #217
Merged
Merged
RFC 7807 Compliance #217
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Jeremy Ho <jujaga@gmail.com>
In order to be RFC 7807 compliant, we need to abandon the express-validation library as it is too inflexible for our needs. This middleware steps in to replace that functionality while minimizing impact to the existing Joi validation codebase. Signed-off-by: Jeremy Ho <jujaga@gmail.com>
We switch over to using our validation library as it allows us to be RFC 7807 compliant and also affords us the ability to report all validation issues instead of just the first one encountered. Signed-off-by: Jeremy Ho <jujaga@gmail.com>
Signed-off-by: Jeremy Ho <jujaga@gmail.com>
We found that artificially restricting the queueSize adversely impacts general network throughput of a filestream to S3. Rolling back to Amazon defaults appears to improve performance without significantly impacting the memory footprint. Signed-off-by: Jeremy Ho <jujaga@gmail.com>
In order to standardize how we deal with 400 and 500 class HTTP responses, we now always throw a Problem error instead of short circuiting with the send method. Instead, we now depend on the top level app error handler to capture and render the Problem. This ensures that we only have one pattern for problem emission. Other minor various unit tests are also updated. Signed-off-by: Jeremy Ho <jujaga@gmail.com>
jujaga
added
bug
Something isn't working
documentation
Improvements or additions to documentation
enhancement
New feature or request
dependencies
Pull requests that update a dependency file
labels
Sep 30, 2023
Code Climate has analyzed commit 6329d2f and detected 8 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 84.4% (50% is the threshold). This pull request will bring the total coverage in the repository to 64.7% (0.2% change). View more on Code Climate. |
Express 4.x still doesn't have native detection for middleware that throws. To mitigate, we do their recommended approach of passing in the Problem to the next callback instead of throwing where applicable. Signed-off-by: Jeremy Ho <jujaga@gmail.com>
wilwong89
approved these changes
Oct 6, 2023
norrisng-bc
approved these changes
Oct 6, 2023
kyle1morel
approved these changes
Oct 6, 2023
TimCsaky
approved these changes
Oct 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR standardizes how we emit errors to be RFC 7807 compliant, implements a thin validation middleware, standardizes problem handling, and various other minor fixes.
SHOWCASE-3192
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Documentation (non-breaking change with enhancements to documentation)
Breaking change (fix or feature that would cause existing functionality to change)
Checklist
Further comments