
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
ember-cli-uncharted-errors
Advanced tools
This library pulls together several different types of ember errors and reports them in a single event called `reportError`
This library pulls together several different types of ember errors and reports them in a single event called reportError. It's meant to be used to send these errors to external reporting services.
ember install:addon ember-cli-uncharted-errors
Once you install this within your project it will automatically pull errors out of Ember.onerror, Ember.RSVP.error, Ember.ActionHandler and error within the application route. Several events will be spun off depending on the status (if it's an HTTP error.)
If the error received has an HTTP status of 401 it will trigger the event authorizationFailed. You can capture that in your route and handle appropriately. Here is an example from the UserLoginRoute.
actions: {
authorizationFailed: function(transition) {
var controller = this.controllerFor('user.login');
controller.set('error', true);
controller.set('loading', false);
}
}
If the error received has an HTTP status of 503 it will trigger the event reportUnavailable. This will essentially mean the server is in maintenance. Handling of this will depend from app to app and this will give you a good spot to notify your users of the maintenance and (optionally) retry the transition.
actions: {
reportUnavailable: function(transition) {
alert('Service is temporarily unavailble');
}
}
The main event in this library is reportError. It's meant to either report the error to the user or to a third-party system. In this example we're reporting to Sentry.
actions: {
reportError: function(error, context, route, transition) {
if (!window.Raven) {
return;
}
var context;
if (route) {
context = Ember.$.extend(context, {
server_revision: route.get('version.server_version'),
browser_revision: route.get('version.client_version')
});
Raven.setUser({
email: route.get('current_user.email')
id: route.get('current_user.id')
});
}
Raven.captureException(error, { extra: context });
}
}
git clone this repositorynpm installbower installember serverember testember test --serverember buildFor more information on using ember-cli, visit http://www.ember-cli.com/.
FAQs
This library pulls together several different types of ember errors and reports them in a single event called `reportError`
We found that ember-cli-uncharted-errors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.