Use it to output a native Google Sheets #ERROR! message when an error occurs.
By default the function returns custom messages when an error occurs (such as #FILTER_NOT_VALID). Those messages are not recognized by Google Sheets as proper errors. Therefore you cannot use the ISERROR or IFERROR functions.
=IMPORTJSON(data_sources, filters, "outputErrors")
or
A | B | |
---|---|---|
1 | outputErrors | TRUE |
3 | =IMPORTJSON(data_sources, filters, A1:B1) |