Skip to content

Conversation

CahidArda
Copy link
Collaborator

@CahidArda CahidArda commented Sep 22, 2025

By default, all bodies passed to context.call and context.invoke are stringified. This means, if you are calling an endpoint which expects specific strings (imagine "coin=BTC") in the body, the string you passed will be stringified and become '"coin=BTC"' and the API you are calling will return 400.

Since we can't change the default behavior which could break many other workflows, we add a parameter to disable the stringify operation. If stringify is disabled, body needs to be string.

In a future major release we may:

  • remove the stringify all together
  • require all bodies to be string
  • remove this parameter.

in both methods, stringifyBody is true by default. I also added tests to both method to check for different behaviors.

in both methods, stringifyBody is true by default. I also added tests to both method to check for different behaviors.
Copy link

linear bot commented Sep 22, 2025

@CahidArda CahidArda changed the title feat: add stringifyBody parameter to context.call and context.invoke DX-2133: add stringifyBody parameter to context.call and context.invoke Sep 23, 2025
@CahidArda CahidArda merged commit 70213d7 into main Sep 24, 2025
52 of 63 checks passed
@CahidArda CahidArda deleted the DX-2133-context-call-body-param branch September 24, 2025 10:26
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