Why can't I create a subscription with valid emitter/listener IDs using Pipedream's API and custom error handling?

This topic was automatically generated from Slack. You can find the original thread here.

Hello Pipedream team,

I was looking at custom error handling using subscriptions API and for some reason i can’t create a subscription:

➜  ~ curl 'https://api.pipedream.com/v1/subscriptions?emitter_id=o_abc123&event_name=$errors&listener_id=p_abc123' \
  -X POST \
  -H "Authorization: Bearer <REDACTED>" \
  -H "Content-Type: application/json"

{"error":"record not found"}%         
                                                                                                                                 ➜  ~ curl 'https://api.pipedream.com/v1/subscriptions?emitter_id=p_*&listener_id=p_KwC5Kay&event_name=$errors' \       
  -X POST \
  -H "Authorization: Bearer <REDACTED>" \
  -H "Content-Type: application/json"

{"data":[]}%                                                                                                                                                           

When i feed it random emitter/listener IDs - it does return a validation error, but when i feed it valid ones - it just responds with {“data”: []}. I checked /v1/users/me/subscriptions - same result - no subscriptions registered. For context - i’m doing it under an org that’s on a free plan and using my own token.

Thank you

Hi , thank you for raising this, I can reproduce your issue and created a ticket here: [BUG] Pipedream REST API - POST /subscription does not create subscription for Emitter ID p_* and dc_* · Issue #6915 · PipedreamHQ/pipedream · GitHub.

The Pipedream team will check it soon. For now you can set the specific workflow ID into emitter_id instead of p_*

could you try adding an org_id query string parameter with the ID of your workspace?

org_id addition worked, thank you! (with p_* for emitter), returned list contains multiple subscriptions (1 per workflow id as far as i can tell).

Thanks, we’ll make sure to update the docs to clarify this

also this integration from the blog post about custom error handling needs it (pipedream/components/pipedream/actions/create-subscription/create-subscription.mjs at master · PipedreamHQ/pipedream · GitHub), not sure if it’s internal or external though.

Thanks again!

great thanks, added this to the ticket I have tracking the work so we can make sure to update that, too

and one more thing: https://api.pipedream.com/v1/users/me/subscriptions returns no subs, with or without org_id

got it thanks