Loopback JS global error logging - node.js

How is it possible to configurate global error logging for Loopback application. I also want to log RestApi errors.
I have tried this https://github.com/strongloop/strong-error-handler but didn't manage to get any errors when using RestApi. In RestApi I got 500 errors with message, but those are not shown in error log

Use this component to log errors in loopback
https://github.com/strongloop/strong-error-handler

Related

"Error: Internal error encountered" while running RequestSync to Google Homegraph API - Node.js

I am using a Nodejs client to integrate with Google Smart Home.
When I request to RequestSync API, it sometimes shows the following error.
Error: Internal error encountered.
Although I saw the above error, it seems that the SYNC request has been triggered properly.
Does anyone know why this happens?
Since the request failed and returned an error, our app retries the RequestSync again and again, so I'd like to fix the error if possible.
Thank you.
Environment
#googleapis/homegraph: 3.0.2
Nodejs: 18.4.0

HTTP Error 500.30 - ANCM In-Process Start Failure with newly created app service

we are created new development environment so I cloned a current working app service into a new one and changed the configurations and deployed same code but the new app service is returning HTTP Error 500.30 - ANCM In-Process Start Failure
after trying the console for more details that's what I get, I don't think its related to runtime identifier because same code runs on different exact app services
The dreaded 500.3x ACNM error can mean different things, so I'm going to assist you in pinpointing those things.
My recommendation:
Go to Azure Portal > Your App Service > development tools
Open console.
Screen should look like this:
Console Screen Azure
Type in (YourWebAppName).exe
What this will do, is show error messages that are relevant to your startup issue.
Also, some information regarding errors can be seen here:
https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#app-startup-errors

How do I display detailed JSON-API JS debugging information in the console?

I want to view the detailed output of JSON-API JS in the console so that I can diagnose the errors that I am getting.
At the moment errors display as: POST /api/v1/resources/resource 500 39.998 ms - 103
I want to get more information about why JSON-API is throwing an error.
Simply prefix the command to start your entire server process with DEBUG=json-api:*
In my case my command to start the development server is now: DEBUG=json-api:* yarn start

Azure backend return 500 in PATCH operation

I am desperately trying to debug an error 500 only when I try to update an object from my xamarin.Forms offline DB to Azure. I am using Azure Mobile Client.
I set all the logging to ON in azure, then I downloaded the log. I can see the generic error, but nothing useful.
<failedRequest url="https://MASKED:80/tables/Appel/9A3342A2-0598-4126-B0F6-2999B524B4AE"
siteId="Masked"
appPoolId="Masked"
processId="6096"
verb="PATCH"
remoteUserName=""
userName=""
tokenUserName="IIS APPPOOL\Masked"
authenticationType="anonymous"
activityId="{80000063-0000-EA00-B63F-84710C7967BB}"
failureReason="STATUS_CODE"
statusCode="500"
triggerStatusCode="500"
timeTaken="625"
xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
>
The table that failed is the only one I extend with some virtual runtime calculated field of navigation field. But I add the [JsonIgnore] to stop AzureService to create field in the local DB (that work) or send it on the wire to the server. But I always got the 500 error, not exception when debugging the c# Azure backend too.
How I can find the stack trace or the "deep" reason for this 500 error in my backend?
For C# Mobile App backend, you could add the following code in the ConfigureMobileApp method of your Startup.MobileApp.cs file for including error details and return to your client side.
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
You could just capture the exception in your mobile application or leverage fiddler to capture the network traces when invoking the PATCH operation to retrieve the detailed error message.
Moreover, you are viewing the Failed Request Traces log, you need to check the Application logs. Details you could follow Enable diagnostics logging for web apps in Azure App Service.

Sentry raven installation only shows example exception

I installed Sentry with docker: https://hub.docker.com/_/sentry/
I've used the nodejs bindings to send exceptions using the example here: https://docs.sentry.io/on-premise/clients/node/
I've sent many error events but it only seems to show the example exception only.
How do I configure it to log new exception / errors?
I've looked through
/etc/sentry/sentry.conf.py
/etc/sentry/config.yml

Resources