Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

application insights - cannot get the complete error in the logs

Hi there, 


I have an simple SQL error displayed on my screen : 



Its a violation of a primary key - that's all it is. 


I am using application insights to log all the errors but it seems the error is split into different parts. It seems the server response is the area within the error that gives the most information. I cannot seem to get that in application insights. 


I just get this in the application insights : 


[{"Message":"The requested operation is invalid."}


Which is guess is the PowerApps generic error and the server is error is what I want. 


I am using a collection to store all the errors from the patch like this : 



Persons is the sql tables and PatchErrors is just the name of the collection. 

The collection has these rows in it 

Column, Error, Message, Record - which makes sense from the Microsoft articles. 


and then I am using a Trace command to push to application insights : 


"Patch to the SQL Error",
UserName: User().FullName,
Error: PatchErrors.Error,
Message: PatchErrors.Message,
Record: PatchErrors.Record,
Column: PatchErrors.Column


I am not just seeing the server error at all and I cannot find it in the Error function. 


Any help would be awesome. 



Frequent Visitor

Does nobody have any help on this issue ? 

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,856)