Skip to content

Commit 09fcbf2

Browse files
feat: Add error_code field to ManagedAuthSession and related components
1 parent 4719594 commit 09fcbf2

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 100
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-82fd51be8dc9b6ad425425f9eb747dd337df494a030d03d37f101e2236c85548.yml
3-
openapi_spec_hash: ab396816e2b7da9938d42ec5a41cc8e1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-b7d469021adcd1493f74dad38746ffa3817dcf86a0a12561a88eb554824e3ffb.yml
3+
openapi_spec_hash: 4134c95bf3012dca38797ca56d62395b
44
config_hash: 27c0ea01aeb797a1767af139851c5b66

authconnection.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ type ManagedAuth struct {
243243
Credential ManagedAuthCredential `json:"credential"`
244244
// Fields awaiting input (present when flow_step=awaiting_input)
245245
DiscoveredFields []ManagedAuthDiscoveredField `json:"discovered_fields,nullable"`
246+
// Machine-readable error code (present when flow_status=failed)
247+
ErrorCode string `json:"error_code,nullable"`
246248
// Error message (present when flow_status=failed)
247249
ErrorMessage string `json:"error_message,nullable"`
248250
// Instructions for external action (present when
@@ -301,6 +303,7 @@ type ManagedAuth struct {
301303
CanReauthReason respjson.Field
302304
Credential respjson.Field
303305
DiscoveredFields respjson.Field
306+
ErrorCode respjson.Field
304307
ErrorMessage respjson.Field
305308
ExternalActionMessage respjson.Field
306309
FlowExpiresAt respjson.Field
@@ -648,6 +651,8 @@ type AuthConnectionFollowResponseUnion struct {
648651
// This field is from variant [AuthConnectionFollowResponseManagedAuthState].
649652
DiscoveredFields []AuthConnectionFollowResponseManagedAuthStateDiscoveredField `json:"discovered_fields"`
650653
// This field is from variant [AuthConnectionFollowResponseManagedAuthState].
654+
ErrorCode string `json:"error_code"`
655+
// This field is from variant [AuthConnectionFollowResponseManagedAuthState].
651656
ErrorMessage string `json:"error_message"`
652657
// This field is from variant [AuthConnectionFollowResponseManagedAuthState].
653658
ExternalActionMessage string `json:"external_action_message"`
@@ -673,6 +678,7 @@ type AuthConnectionFollowResponseUnion struct {
673678
FlowStep respjson.Field
674679
Timestamp respjson.Field
675680
DiscoveredFields respjson.Field
681+
ErrorCode respjson.Field
676682
ErrorMessage respjson.Field
677683
ExternalActionMessage respjson.Field
678684
FlowType respjson.Field
@@ -756,6 +762,8 @@ type AuthConnectionFollowResponseManagedAuthState struct {
756762
Timestamp time.Time `json:"timestamp,required" format:"date-time"`
757763
// Fields awaiting input (present when flow_step=AWAITING_INPUT).
758764
DiscoveredFields []AuthConnectionFollowResponseManagedAuthStateDiscoveredField `json:"discovered_fields"`
765+
// Machine-readable error code (present when flow_status=FAILED).
766+
ErrorCode string `json:"error_code"`
759767
// Error message (present when flow_status=FAILED).
760768
ErrorMessage string `json:"error_message"`
761769
// Instructions for external action (present when
@@ -786,6 +794,7 @@ type AuthConnectionFollowResponseManagedAuthState struct {
786794
FlowStep respjson.Field
787795
Timestamp respjson.Field
788796
DiscoveredFields respjson.Field
797+
ErrorCode respjson.Field
789798
ErrorMessage respjson.Field
790799
ExternalActionMessage respjson.Field
791800
FlowType respjson.Field

0 commit comments

Comments
 (0)