cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the "Transaction ID" if a WEBAPI failed to hit?

Mani
Level 4

Hi Team,

The transaction Id will be fetched as output of WebAPI if it get succeed.

How to retrieve the "Transaction ID" if a WEBAPI failed to hit?

Can anyone provide me a solution for this query please..

Thanks in Advance.



------------------------------
Mani K
------------------------------
1 BEST ANSWER

Helpful Answers

@Mani,

If the transaction ID isn't part of the error message ​then it may be in the HTTP headers. Unfortunately, the Web API feature doesn't expose those on an error.

You may have to switch to using the HTTP VBO.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

View answer in original post

7 REPLIES 7

ewilson
Staff
Staff
@Mani,

Couple questions:

  1. When you say Web API, are you referring to the Web API feature in Blue Prism?​ 
  2. When you say "failed to hit" are you saying the HTTP request returned an error code (ex. HTTP 401, 500, etc)?

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @ewilson
When you say Web API, are you referring to the Web API feature in Blue Prism?​ 
  •          Yes it is in Blueprism.
When you say "failed to hit" are you saying the HTTP request returned an error code (ex. HTTP 401, 500, etc)?
  •             Yes absolutely, I got HTTP:400 error.​​​


------------------------------
Mani K
------------------------------

@Mani,

Ok. And the web service you're calling actually returns the Transaction ID in the error response information? If so, you should be able to place  Block and Recover around your call to the web service. If the service responds with an error, the Recover stage will pick up the processing. From their you can use a Calculation stage to get the exception message which will hopefully include the Transaction ID.

If that doesn't work, the only option would be to swap out the Web API for the Utility - HTTP VBO, and use that to make the calls to the web service. The HTTP VBO does a much better job of returning the full response, even on an error, including any HTTP headers.

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @ewilson

Thanks you for the reply @EricWilson1 
I'll try the process and let you know..



------------------------------
Mani K
------------------------------

Hi @ewilson

I am trying to call a WEBAPI through Blueprism. The WEBAPI call when fails returns me the error code, custom error message. The Client API will also be returning the transaction ID.
My problem is that, I don't know where to look for Transaction ID, So that I can talk to the client with reference to Transaction ID.​

Thanks in advance.

------------------------------
Mani K
------------------------------

@Mani,

If the transaction ID isn't part of the error message ​then it may be in the HTTP headers. Unfortunately, the Web API feature doesn't expose those on an error.

You may have to switch to using the HTTP VBO.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thank you @ewilson for the time given to my issue and helping me ​

------------------------------
Mani K
------------------------------