Mattias De Smet on 17 Apr 2024 09:08:39
When a PowerBI semantic model refresh fails, an email is sent to the owner with the subject "Refresh failed" and an unformatted string of JSON with details.
Problem: This is not a clear actionable email and easily puts you on the wrong track trying to identify the problem.
E.g. Refresh failed:
Sales has failed to refresh.
Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.
{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Timeout expired. The timeout period elapsed prior to completion of the operation."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.HostingError.Reason","detail":{"type":1,"value":"Timeout"}}],"exceptionCulprit":1}}} Table: Invoice Line.
As you can see on the variety of colours used all the different clues there are, but they don't help. As a user I can see:
- ok , the dataset refresh failed, due to an internal service error... probably nothing I can do about, but let's dig deeper
- dataaccesserror, value -2147467259... where can I find this value? Do I recognize it from data in my data model?
- oh, underlying error, weird looking tags, probably to difficult for me to understand. Something about timeout elapsed, but what timeout, where, what was happening?
- at the very end, the most important hint, which is so easily overlooked "Table Invoice Line", ok this is where something went wrong
Solution(s):
It would be more clear if either:
1/ the JSON was formatted, so the structure of the error message becomes more "interpretable".
Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.
Table: Invoice Line.
{
"error": {
"code":"DM_GWPipeline_Gateway_MashupDataAccessError",
"pbi.error":{
"code": "DM_GWPipeline_Gateway_MashupDataAccessError",
"parameters":{},
"details": [{
"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode",
"detail":{
"type":1,
"value":"-2147467259"
}
},{
"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage",
"detail": {
"type":1,
"value":"Timeout expired. The timeout period elapsed prior to completion of the operation."
}
},....
2/ the JSON was rendered as a clear error message (with a "see details" for the geek that wants to see the actual JSON result) in a format like:
Semantic Model "Sales Process" refresh failed:
Table "Invoice Line" failed with error:
Timeout expired. The timeout period elapsed prior to completion of the operation. (Code: -2147467259 - https://aka.ms/2147467259)
Nice-to-have: It would be even more helpful if (for admins) the value of the timeout period is shown and the statement of the operation can be shown, to allow faster troubleshooting, but I can understand this can expose internal logic and pose a risk.