Receiving error : Handle Error: Operation returned an invalid status code 'BadRequest' from Trigger in Production

I am getting the following error when trying to run a process as a trigger. The error occurs when it is trying to add the items to the queue:

Handle Error: Operation returned an invalid status code ‘BadRequest’

I am not able to reproduce this error in our dev environment using the same configuration for the Queue, Trigger, and Process Code. The error occurs when running in production as a trigger.

I have already verified the following:

  1. The same exact configuration works without errors in dev.
  2. Unique Reference is set to No on the queue.
  3. Bulk Add Queue is used a few times in my application. The first time it is used, it works. The second time, is when this error occurs.
  4. The queue is using no unique reference, no auto retry, description is blank, specific Data JSON Schema is blank, Output DataJSON Schema is blank, Analytics Data JSON Schema is blank, Enable SLA for this queue is off.
  5. The process runs successfully using a different queue which is specified in the csv configuration file. However, there is code in the process that if an argument is set to true, then it tries to use this different queue which is specified in the trigger arguments. I setup the same configuration in our dev environment, but it runs successfully there. This error only happens in Prod.

Any ideas on what else to look for in my Prod environment?

Hi,

Look through these posts/video:

Thanks for the update. However, I had already looked at those posts before posting. I am assuming the issue is not #3, since this works in Dev using sample data similar to the real data (headers would be the same), but does not work in Prod which would use the same header structure.

Any other ideas?

@RPADEV-EBG

Did you try running in debug and check the inner exception details from locals panel

Or add a try catch and write the whole exception and inner exception as well to verify…

Also can you try setting individual items to process …so that if any specific item is causing the issue then we can look into that specific data

I agree same headers worked but the data might be little different as well

Hope this helps

Cheers

Since I can’t reproduce this on anything but Production. I would not be able to run it in Studio to debug it.

@RPADEV-EBG

You can try this…in catch write the inner exception details as well in log to check

Cheers

I am trying not to edit the code again since this code has worked previously without this error. So this solution will not work for me. Also, I tried to reproduce this in dev using the same setup and same code, it does not reproduce.

Any other suggestions that do not involve editing the code?

@RPADEV-EBG

No changes to the code…it is debug I asked you to add log messages extra …

Else as you are unable to reproduce the error in dev that is the reason we have to add logs atleast to understand the details

Cheers