cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JasonHoffo
Frequent Visitor

application insights - cannot get the complete error in the logs

Hi there, 

 

I have an simple SQL error displayed on my screen : 

 

JasonHoffo_0-1643816865112.png

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 : 

 

Collect(PatchErrors,Errors(Persons));

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 : 

 

Trace(
"Patch to the SQL Error",
TraceSeverity.Critical,
{
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. 

 

 

1 REPLY 1
JasonHoffo
Frequent Visitor

Does nobody have any help on this issue ? 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,633)