Hello,
We use WebServiceDataSource with OData query in our reports. Sometimes OData can through an exception.
In our case, we have added Web Service DataSource and set this OData query for its Service Url:
https://services.odata.org/V3/Northwind/Northwind.svc/Products(1)?$select=ProductName1
If you see the query, it is selecting "ProductName1" property of "Product #1". But "ProductName1" property does not exist (correct property name is "ProductName"). When we use Postman for the OData query above, it shows an error which you can see from attached picture (ErrorWhenWeUsePostman.PNG, "Could not find a property named 'ProductName1' on type 'NorthwindModel.Product'"). From the second picture (TelerikReportingGeneralError.PNG, "An error has occurred... Response status code does not indicate success: 400 (Bad Request).") you can see the result of our test report (in html5 report viewer) that has the same OData query.
The question is when we preview our report (in html5 report viewer) how can we show the error message that OData sent instead of showing Telerik reporting general error?
Instead of this message:
An error has occurred while processing Report 'TestReportWithWebServiceDataSource': Response status code does not indicate success: 400 (Bad Request).
This OData error message should be handled and shown on browser (html5 report viewer) when previewing report:
Could not find a property named 'ProductName1' on type 'NorthwindModel.Product'
FYI: We are using Telerik Reporting version 15.0.21.224.
This is my post on Telerik forum related with this: How to get internal error message from Custom Report Resolver
Thank you,