Repository navigation
fix(rest): separate resource errors from base errors - #1471
Open
efegokdemir wants to merge 1 commit into
Open
efegokdemir wants to merge 1 commit into
efegokdemir wants to merge 1 commit into
Conversation
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.
Description
Fixes #1255
Generated
DiscountCoderesources define an APIerrorsfield, which shared the@errorsinstance variable used byRest::Basefor HTTP error tracking. Keep the base error collection separate so the resource field retains its declared value and failed saves re-raise the originalHttpResponseError.How has this been tested?
TypeErrorwhen readingDiscountCode#errors; it passes after the fix.bundle exec ruby -Itest test/rest/base_errors_test.rb— 4 tests passed.API_VERSION=2023_10 bundle exec rake test:rest_wrappers— 642 tests passed.API_VERSION=2026_07 bundle exec rake test:rest_wrappers— 626 tests passed.bundle exec rake test:rest_wrappers— 10,883 tests passed.bundle exec rake test:library— 342 tests passed.bundle exec rubocop— 108 files inspected, no offences.srb tccould not run because the locked Sorbet binary is x86_64 and cannot execute on this host.Checklist: