Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Product: Power BI Desktop (x64)
Version: 2.54.4970.961
I'm using File.Contents function for reading a file that doesn't exists in my filesystem. I expect it to return an error. Graphically it does, as shown in the image below:
The code for the query above:
let
Source = File.Contents("C:\not-existent-file.txt")
in
SourceAlthough if a try to catch the error programmatically, by using a try expression, it returns a record, with the HasError field set to false, as shown in the image below:
The code for the query above:
let
Source = try File.Contents("C:\not-existent-file.txt")
in
SourceI don't think that is the expected behavior.
I actually expect the HasError field to be set to true and an Error field containing an Error record. So I could programmatically deal with it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.