Raise typed errors for the two known pair-endpoint failures#41
Merged
Conversation
martijnversluis
force-pushed
the
raise-typed-easee-pair-errors
branch
from
June 25, 2026 13:11
68babee to
7f9d68a
Compare
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.
Voortgekomen uit StekkerWeb PR https://github.com/stekker/stekker/pull/8057 (Easee-pairing fouten specifiek maken voor eindgebruikers). De errorCode → typed-exception translatie hoort in de gem zelf, niet in de StekkerWeb-connection.
Twee nieuwe subclasses van
Errors::RequestFailed:Errors::InvalidPinCode—errorCode: 193(NotPossibleToGrantAccessWithPinCode), pincode wordt afgewezen door EaseeErrors::ChargerNotFound—errorCode: 400(ChargerNotFound), serienummer onbekend bij Easee (paal niet geclaimd of typo)Backward compatible: beide erven van
Errors::RequestFailed, dus bestaanderescue Easee::Errors::RequestFailed-code blijft werken; nieuwe code kan specifieker rescuen.Mapping in
raise_credentials_or_request_errorhoudt de bestaande 100/727 InvalidCredentials-check (login-pad) intact en voegt de twee nieuwe codes ernaast toe. Match operrorCode(numeriek, stabiel) ipverrorCodeName(string-naam die hernoemd kan worden).Tests via WebMock met de echte response-body-vorm.
Na merge: gem-bump in StekkerWeb + cleanup van
Connections::Easee#with_translated_errorsdaar.