fix(recipes): correct error_descriptor/error_parts field names to match API - #96
Merged
zaynelt merged 1 commit intoJul 23, 2026
Conversation
…ch API
ErrorDescriptor and ErrorParts declared json tags ("type", "message") that
don't exist in the Workato API response. The real fields are error_type,
error_id, line_number, adapter, error_at, actionable, action, trigger (on
error_descriptor) and message, error_type, error_id, action, line_number,
adapter, retry_count (on error_parts) — verified against a live dev API job.
Both structs silently decoded to their zero value on every real job.
Also expands HTTPResponse (protocol, normalized_status_text) and
ErrorDetails (message, inner_message) to match the full response, and
registers all four structs in TestStructFieldCoverage so a future field
rename can't regress silently again.
Collaborator
|
Thanks @Abhishek-Bhatta! Really appreciate you catching the omissions & errors and contributing the correct shapes. |
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
Follow-up to the review on #93 — targets
zt/api-gap-closuredirectly (per @zaynelt's request in this comment) rather thandevelop, since it's a correction on top of that PR's existing structs.ErrorDescriptorandErrorPartsdeclared json tags (type,message) that don't exist in the real Workato API response, so both structs silently decoded to their zero value on every real job — verified against a live dev API job (GET /recipes/{id}/jobs/{job_id}):This PR:
HTTPResponse(protocol,normalized_status_text) andErrorDetails(message,inner_message) to match the full responseErrorDescriptor,ErrorDetails,HTTPResponse,ErrorParts) inTestStructFieldCoverage— none of them were covered before, which is how the mismatch went unguardedTestRecipeService_GetJobto assert on the real field namesVerified end-to-end against a live failed job —
error_descriptoranderror_partsnow populate correctly instead of decoding empty.Checklist
go build ./...andgo test ./...passCHANGELOG.mdupdated as needed — not touched; scoped as a correction to unreleased structs from Zt/api gap closure #93, no user-facing behavior to log yet