Skip to content

fix: URL-encode workflow names with special characters#298

Draft
joelklabo wants to merge 1 commit into
MagnivOrg:masterfrom
joelklabo:fix/url-encode-workflow-name
Draft

fix: URL-encode workflow names with special characters#298
joelklabo wants to merge 1 commit into
MagnivOrg:masterfrom
joelklabo:fix/url-encode-workflow-name

Conversation

@joelklabo
Copy link
Copy Markdown

Summary

  • Fixes URL encoding issue for workflow names containing special characters like slashes
  • The _resolve_workflow_id function now properly URL-encodes workflow names before making API calls

Problem

Workflow names with slashes were not being encoded, causing API calls to fail.

Solution

Added URL encoding in the _resolve_workflow_id function.

…rkflow_id

Fixes MagnivOrg#254

The _resolve_workflow_id() function builds a URL like:
{base_url}/workflows/{workflow_id_or_name}

When workflow_id_or_name contains special characters such as slashes
(e.g. 'team/my-workflow'), the slash is treated as a URL path separator
by the server, resulting in a 404 or wrong-resource response.

Fix: apply urllib.parse.quote(str(workflow_id_or_name), safe='') to
encode ALL special characters before interpolating into the URL.

The prompt-templates endpoint already received this fix (via PR MagnivOrg#291).
This commit closes the remaining gap in _resolve_workflow_id.
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.

1 participant