Hello,
I have on the showDetail action I try to ask a external api from some data.
But I noticed that on some occasions the respons back will be e empty respons.
How can I the best deal with this situation.
Hi Roelof,
Please check https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Consume_REST_APIs/Handling_REST_Errors
check "Manipulating received error responses" section you can customize response and throw error based on http codes or you can set 200 it will not throw error.
Hope this helps..Thanks,
Ajay
Ajay Sharma wrote:
Please mark this post as solution if you think I am able to guide you in right direction...
Thanks,
I would suggest you to do a check using the IF node with condition like
GetCollectionDetails.Response.ArtObject.ObjectNumber = ""
before executing the GetTiles API action, in order to avoid the 500 internal error from the GetTiles API action in case of ObjectNumber = "" (in case of GetCollectionDetails empty response) as implemented in the attached .oml file
Hope this helps you!
Regards,
Benjith Sam
hmm
I still get a 500 warning when I want to see the details of some paintings.
and the logs are not very helpfull :
500 Internal Server Errorat ssRijksMuseumScreens.CcRijksmuseum.ActionGetCollectionDetails(HeContext heContext, ICcRijksmuseumCallbacks _callbacks, String inParamNUMBER, STGetCollectionDetailsResponseStructure& outParamResponse) at ssRijksMuseumScreens.Flows.FlowMainFlow.ScrnCollectionList.CommandShowDetail(HeContext heContext)
Roelof Wobben wrote:
Yes, it is because of the empty/blank object number from the current table records, which is used as an input parameter while calling the API action
- Either put an additional IF check before calling the API action
Or
- Define an exception handling mechanism for such scenario
hmm, that is wierd
As far as I can see the one that causes the 500 error has a objectnumber.I will look at your oml.
Yep, I doublechecked and it has the objectNumber SK-A-372
I tried your code but still on that painting a 500 response
the problem is somewhat complicted.
The number is not empty but I get a empty response back from the server. In the code that I made I try to fill in the number with the recieved object Number which is not there in the response. So it chrashes. I have to think good how to solve that one.
Thanks,.
I do not have that choice