Repository navigation
Conversation
…onses OFREP's evaluationFailure schema names the fields errorCode and errorDetails, so a spec-compliant 400 raised ParseError instead of returning the server's error code. Update the error-path fixtures to the spec casing. Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com>
josecolella
approved these changes
Nov 2, 2026
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of Changes
Fixes #283
OpenFeature::OFREP::Client#parse_error_responselooked forerror_codeanderror_details, but the OFREPevaluationFailureschema names themerrorCodeanderrorDetails(open-feature/protocolservice/openapi.yaml). A 400 from a spec-compliant server raisedParseErrorand the server's error code and details were lost. The parser now reads the spec's field names. The error-path fixtures inclient_spec.rbandprovider_spec.rbused the same snake_case keys, so they are updated to the spec casing.ParseErroris still not rescued inProvider#evaluate. That is left for a separate change, as the issue suggests.Type of Change
Testing
With the fixtures switched to camelCase and the old parser,
client_spec.rb:45andprovider_spec.rb:120fail withOpenFeature::OFREP::ParseError(44 examples, 2 failures). With the fix,bundle exec rake(standard + rspec) passes: 44 examples, 0 failures, no offenses, on Ruby 3.4.Checklist
bundle exec rspec)bundle exec rubocop)git commit -s)