Skip to main content
May 27, 2024
Question

Convert binary to Appian document

  • May 27, 2024
  • 7 replies
  • 1 view

I have an integration which returns the document in binary format and I can convert that to Appian document using the option to Convert Binary response to Appian document.

But this API returns JSON body as below while returning error. I want to extract this error details and present it to the users but the integration object is returning null response body when I select the option "Convert Binary response to Appian document" even though API is returning below body.

Is there any way to extract this body when API returns error and convert the binary to Appian document in case of successful response ?

API Response as JSON body:

{"type":"about:blank","title":"Bad Request","status":400,"detail":"Failed to read request","instance":"/api/v1/"}

Integration Response:

    7 replies

    stefanhelzle0001
    May 27, 2024

    No, that config cannot be changed based on the return value. But I assume that the API also returns a status code. Then, based on the status code, you could read the JSON from that file and process it.

    May 27, 2024

    Thanks for the response but Appian is not converting that JSON response as document and instead returning null value in body, so I am unable to process it. 

    stefanhelzle0001
    May 27, 2024

    Sorry, I understand ...

    I do not have any ready made solution, but did you try to customise error handling? It might be possible to get access to the JSON inside the error handling expression.