Skip to content

Make Error fields generated#1901

Merged
xavdid merged 1 commit into
masterfrom
RUN_DEVSDK-2568
Jul 13, 2026
Merged

Make Error fields generated#1901
xavdid merged 1 commit into
masterfrom
RUN_DEVSDK-2568

Conversation

@xavdid

@xavdid xavdid commented Jul 10, 2026

Copy link
Copy Markdown
Member

Why?

Our main API Error class has always been handwritten. As new fields have been added to api_errors in the spec over time (e.g. advice_code, network_advice_code, network_decline_code), we haven't picked them up in the SDKs.

This makes most of those properties generated so they stay in sync.

What?

  • Makes the fields on the API error object generated from the OpenAPI spec
  • Adds section markers so codegen can maintain these fields going forward
  • add tests
  • except error.rb from the long line linter 😠

See Also

@xavdid xavdid marked this pull request as ready for review July 10, 2026 20:16
@xavdid xavdid requested a review from a team as a code owner July 10, 2026 20:16
@xavdid xavdid requested review from justiny-stripe and removed request for a team July 10, 2026 20:16
@xavdid xavdid enabled auto-merge (squash) July 10, 2026 20:16
@xavdid xavdid requested a review from jar-stripe July 10, 2026 20:18

@jar-stripe jar-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should have .rbi file changes as well, right?

@xavdid

xavdid commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Weirdly there's no error.rbi, so I didn't add it. probably should, but am still so fuzzy on the rbi stuff I didn't want that to hold up the rest of the work.

@xavdid

xavdid commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

Ok, missing error.rbi filed as DEVSDK-3206, which will be handled in a follow up!

@xavdid xavdid merged commit ca844e8 into master Jul 13, 2026
15 checks passed
@xavdid xavdid deleted the RUN_DEVSDK-2568 branch July 13, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants