Catch error message when web request fails
I'm doing a web request to an API with a search parameter from user input in a display form. When the search fails due to a search expression that the API doesn't recognize, i see in the console that the web request returns "outputs: undefined". But in the devTools network tab, I see that the API has given a response with some error messages. See e.g. the messages thrown from this request: https://www.vegvesen.no/nvdb/api/v2/veg?vegreferanse=50000%20Ev6%20hp21%20m767
I would like to fetch these messages and present them to the user inside the workflow. Is that possible?
0
-
I solved this by running the web request inside a Try-Catch
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar