I am successfully using airbrake in my ruby on rails app with one exception.
On visiting a specific view, I am occasionally getting a 401 unauthorized error:
POST https://api.airbrake.io/api/v3/projects/0/notices?key= 401 (Unauthorized)
api.airbrake.io/api/v3/projects/0/notices?key=:1
The key appears to be missing however it is only missing sometimes..
I am setting my airbrake credentials in my app.js
file as follows:
// Airbrake project creds
// projectId, projectKey
Airbrake.setProject(projID, projKey);
window.onerror = function(message, file, line) {
Airbrake.push({error: {message: message, fileName: file, lineNumber: line}});
}
Why might this fail sometimes but work other times on one specific view?