
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ng-error-tracker
Advanced tools
NG Error Tracker is an Angular package that securely captures and sends error logs to a configurable endpoint. It encrypts logs before sending, avoids duplicates, and temporarily stores logs in localStorage if the connection is unavailable.
npm install ng-error-tracker
main.tsimport { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { provideErrorTracker, ErrorLoggerInterceptor } from 'ng-error-tracker';
bootstrapApplication(AppComponent, {
providers: [
provideHttpClient(withInterceptorsFromDi()),
{ provide: HTTP_INTERCEPTORS, useClass: ErrorLoggerInterceptor, multi: true },
provideErrorTracker({
enableLogging: true,
apiUrl: 'https://my-api-logs.com/errors',
apiKey: 'abcdef-12345',
publicKeyUrl: 'https://my-api-logs.com/public-key',
appName: 'MyApp',
appEnv: 'production',
appBuildId: 'abcdef123456'
}),
],
});
If you want to manually capture errors:
import { ErrorLoggerService } from 'ng-error-tracker';
constructor(private errorLogger: ErrorLoggerService) {}
try {
throw new Error('Testing error');
} catch (error) {
this.errorLogger.handleError(error);
}
Below is a refined parameters table that clearly explains when a public key is required, which RSA format is expected (DER), and other details for an AES-256-GCM + RSA-OAEP-SHA-256 encryption scenario. In short, AES-256-GCM handles large data, and RSA-OAEP-SHA-256 secures the AES key. You must provide a public key if you want encryption.
| Option | Description | Required |
|---|---|---|
| enableLogging | Enables or disables logging (boolean). | Yes |
| apiUrl | Endpoint where the logs are sent. | Yes |
| apiKey | Authentication key for the API. | No |
| publicKey | RSA public key (BASE64(DER format)) to encrypt logs. If this is not provided, you must specify publicKeyUrl. | No (Required if publicKeyUrl is not provided) |
| publicKeyUrl | URL returning your RSA public key in BASE64(DER format). The library fetches it to encrypt logs. If omitted, you must directly supply publicKey. | No |
| appName | Name of the application generating the logs. | Yes |
| appEnv | Environment or build configuration (e.g., dev, staging, prod). | Yes |
| appBuildId | Unique build identifier for the application. If not provided, the library will attempt to generate it automatically using a hash of application main file. In web environments, it will fetch main file and extract portions of its content for hashing. If none of these methods succeed, a default value of 'unknown-build-id' will be used. | No (Auto-generated if omitted) |
AES-256-GCM + RSA-OAEP-SHA-256:
The library encrypts large logs with AES-256-GCM to avoid the “Message too long for RSA” limitation.
It then encrypts the AES key itself using an RSA public key (via Web Crypto API).
DER Format:
The RSA public key must be a DER encoding.
publicKey vs publicKeyUrl:
publicKey.publicKeyUrl.🔹 What if the logging API is unavailable?
➡️ The logs are stored in localStorage and resent when the app restarts or upon navigation.
🔹 How do I disable log capturing?
➡️ Set enableLogging: false in the initialization provider.
🔹 Can I send logs manually?
➡️ Yes, just call this.errorLogger.handleError(error) from anywhere in your code.
This project is licensed under the MIT License. See the LICENSE file for more information.
🚀 Developed by Dyango Rodríguez | 💡 Contributions and improvements welcome.
FAQs
Angular library for securely capturing and sending logs.
We found that ng-error-tracker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.