Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Provide helpful error response on the REST API, PowerBIEntityFrameworkOperationException is not.

Hi,

 

As developer I'm well aware that we make mistakes or interpert the documentation a different way then intended but when you provide me with 400 status code and an exception message of "PowerBIEntityFrameworkOperationException". 

 

Then you are doing something wrong because I'm not using EntityFramework so how can it be client error?? It should have been a 500 status code and even more important explain to me why it happens because PowerBIEntityFrameworkOperationException isn't telling me anything about how to solve my issue.

I'm calling:

POST  https://api.powerbi.com/v1.0/myorg/gateways/67...../datasources
with
{
"dataSourceType": "Sql",
"connectionDetails": "{\"server\":\"server\\temp\",\"database\":\"AdventureWorksDW2017\"}",
"credentialDetails": {
"credentials": "tPo5......",
"credentialType": "Windows",
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "RSA-OAEP",
"privacyLevel": "Organizational",
"useCallerAADIdentity": false
},
"dataSourceName": "N3"
}
Note: creating the same gateway through  https://app.powerbi.com works just fine so the gateway and the connection information are not incorrect.
And i get the very useful response on the request:
BadRequest with

{"error":{"code":"PowerBIEntityFrameworkOperationException","pbi.error":{"code":"PowerBIEntityFrameworkOperationException","parameters":{},"details":[]}}}

???

Status: New
Comments
v-chuncz-msft
Community Support

@YvonneA2020 

 

A similar issue has been reported: CRI 219058293, so stay tuned. 

Anonymous
Not applicable

It would really be helpful if MS can expose the error response as a model class so that we can just read as Json , instead of readAsString.