Why am I receiving AxiosError 404 and 502 status codes in my request?

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

Here’s the errors:

AxiosError - Request failed with status code 404
{"error":{"message":"Invalid URL (POST /ext/audio/decode_audio_file_raw)","type":"invalid_request_error","param":null,"code":null}}
DETAILS

    at null.settle (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:1970:12)
    at BrotliDecompress.handleStreamEnd (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:3069:11)
    at BrotliDecompress.emit (node:events:529:35)
    at null.endReadableNT (node:internal/streams/readable:1368:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

AxiosError - Request failed with status code 502
"<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>cloudflare</center>\r\n</body>\r\n</html>\r\n"

    at null.settle (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:1970:12)
    at IncomingMessage.handleStreamEnd (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:3069:11)
    at IncomingMessage.emit (node:events:529:35)
    at null.endReadableNT (node:internal/streams/readable:1368:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

I think this might be your issue:

Invalid URL (POST /ext/audio/decode_audio_file_raw)

The /ext/audio/decode_audio_file_raw is a path, not a URL.

I’m not sure how the URL is being built within your Node.js code, but feel free to sure so we can give some guidance.

I’m using the canned Pipedream “Create Transcription” block so there’s not any code to edit here…

Can you share what your inputs look like? A screenshot would help. The Inputs tab also gives you a breakdown of the rendered inputs

Have you double checked that steps.download_file_to_temp.$return_value.tmpPath points to a valid path and file to /tmp via the Inputs tab on that step?

Otherwise these might just be errors from OpenAI’s API itself. I wonder if they have an community issue posted about these issues with transcriptions

The fact it’s intermittent makes me really suspicious of issues on OpenAIs side

Maybe! But API’s can have intermittent issues too.

That’s why I suggest taking at look at Inputs on these failed events, so you can inspect the actual rendered inputs.

Screenshot 2024-02-01 at 12.17.42 PM.png

do we know if there’s any retry logic built into the create transcription block or Axios error handling? It seems like there must be and on retry I can often get these to go through.

The path could be problematic because there’s a space between Steven and Sours.

File paths don’t handle spaces well, unless they’re escaped. I recommend using underscores instead of spaces in file names.

Yes, you can enable automatic retries within the Workflow’s Settings.

Pipedream will automatically retry any failed API requests for you.

Hi, I’m continuing to get intermittent errors on this but it’s now an axios 500 error with the response below. This seems like either an openai issue or something about the request. Any suggestions (it’s becoming hugely detrimental to have to retry these requests regularly)?

AxiosError - Request failed with status code 500
{“error”:{“message”:“The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 8fefe2f37bd041165fc533e22e307831 in your email.)“,”type”:“server_error”,“param”:null,“code”:null}}

    at null.settle (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:1970:12)
    at IncomingMessage.handleStreamEnd (/pipedream/dist/code/515c7421c8307b88b25f1013554e724d8dfff81cfa0849045c8b4e54d96c4f0b/node_modules/.pnpm/axios@1.6.5/node_modules/axios/dist/node/axios.cjs:3069:11)
    at IncomingMessage.emit (node:events:529:35)
    at null.endReadableNT (node:internal/streams/readable:1368:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

That error is emitted from OpenAI:

The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at [help.openai.com](http://help.openai.com) if you keep seeing this error. (Please include the request ID 8fefe2f37bd041165fc533e22e307831 in your email.

It suggests opening a support ticket with OpenAI with that specific request ID for more context

Can you help me if there are any statistics on number of successful “create transcription” run events in the last few days to identify if this is confined to my experience or if this is wider spread?

No, sorry we cannot provide that data.

Again, this error is coming from OpenAI, it’s not related to Pipedream or the configuration of your workflow.

I would contact OpenAI for additional support, or start a thread in their community forum. That’s a more direct channel.

OK, thanks