Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I have built an Excel file that gets data from REST API using the web.contents function. The result of the API (Json) is developed in order to have some of the content of the data in dedicated columns
It sometimes happen that the API fails (400 or 500 return code) and in this situation, the develop function fails as the content of the column is not a record (If the return code is not 200, the column is set with the http return code). I managed to filter the rows based on the non expected values (i.e. 400 or 500) but this is not the most efficient solution as if any other http code is returned, I'll loose again the data up to the point of failure.
My Excel file is currently running hence not possible to show any content but I will as soon as it finished (hopefully with sucess this time).
Maybe someone has already a hint on how to manage this situation of non expected column type...
Thanks in advance!
Hi @stephdurand
Hard to give advice without seeing the code and data but you might be able to use try ... otherwise to check what the API returns and take appropriate action.
This might explain how to use try ... otherwise
IFERROR in Power Query Using TRY OTHERWISE • My Online Training Hub
Regards
Phil
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.