Tag not monitored by Microsoft.
Can't simulate your API so let's take the following query (make sure the query Regional Settings is set to EN-US otherwise the ChangeTypes step will fail):
let
Source = Web.Page(
Web.Contents("https://old.nasdaq.com/symbol/msft/financials?query=income-statement&data=quarterly")
),
FirstDataTable = Table.First(Source)[Data],
ChangedTypes = Table.TransformColumnTypes(FirstDataTable,
{{List.First(Table.ColumnNames(FirstDataTable)), type text}} &
List.Transform(List.Skip(Table.ColumnNames(FirstDataTable)), each
{_, Currency.Type}
)
)
in
ChangedTypes
Above query modified to handle error in Source:
let
Source = try Web.Page(
Web.Contents("https://old.nasdaq.com/symbol/msft/financials?query=income-statement&data=quarterly")
),
SourceHasData = Source[Value],
FirstDataTable = Table.First(SourceHasData)[Data],
ChangedTypes = Table.TransformColumnTypes(FirstDataTable,
{{List.First(Table.ColumnNames(FirstDataTable)), type text}} &
List.Transform(List.Skip(Table.ColumnNames(FirstDataTable)), each
{_, Currency.Type}
)
),
SourceHasNoData = #table(type table [Source = text], {{"No Data"}}),
Result = if Source[HasError] then SourceHasNoData else ChangedTypes
in
Result
Now, to simulate an error in Source and output "No Data", change the https string (line #3) with i.e. "https://zzz.nasdaq...."
Just in case: Power Query M Error Handling chapter is here
EDIT Corresponding sample workbook avail. here