question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

is package `airbrake-js` posting to `api.airbrake.io` ? (and not `airbrake.io`)

See original GitHub issue

sorry, not sure where to post this

On airbrake.io, we are alerted that posting errors to airbrake.io directly is deprecated and should be done through api.airbrake.io

This page states which notifiers are affected https://airbrake.io/try/updating-notifiers-to-use-correct-endpoint#javascript-notifier

but it does not state if users of airbrake-js (prior to split into @airbrake/node and @airbrake/browser) are affected or not by this problem…

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thompilercommented, May 26, 2021

Hey @MathieuDerelle adding on to what @mmcdaris mentioned, older versions of airbrake-js (before the browser and node packages) that I can see, all point to api.airbrake.io. The oldest one I have seen is 0.4.2. You can check this yourself here: https://cdnjs.cloudflare.com/ajax/libs/airbrake-js/0.4.2/client.js

Look for the line referencing https://api.airbrake.io.

Is there a specific version that you’re using? By the way, we would generally recommend using the latest version of our notifiers to get the latest features and improvements.

0reactions
MathieuDerellecommented, Jun 17, 2021

it also need to add an error middleware in nuxt

I’ve just found out about your express instrumentation https://github.com/airbrake/airbrake-js/tree/master/packages/node/examples/express It would work for us, because we use an hybrid express/connect config

But nuxt uses connect by default and I don’t think it’s compatible

the hybrid config consists of a middleware :

// https://nuxtjs.org/examples/auth-routes/

// Transform req & res to have the same API as express
// So we can use res.status() & res.json()

import express from 'express'
const app = express()

export default (req, res, next) => {
  Object.setPrototypeOf(req, app.request)
  Object.setPrototypeOf(res, app.response)
  req.res = res
  res.req = req
  next()
}

(feels a bit dirty but it works)

Read more comments on GitHub >

github_iconTop Results From Across the Web

API - Airbrake Docs
The official API documentation for Airbrake. On this page. Authentication. Create user token v4. HTTP request; POST data; Response.
Read more >
Go - Airbrake Docs
Gobrake provides a minimalist API that enables the ability to send any Go error or panic to the Airbrake dashboard. The module is...
Read more >
Rejected errors - Airbrake Docs
The error notice is rejected if it is sent with incorrect JSON as determined by: JSON: POST data schema and POST data fields....
Read more >
Java - Airbrake Docs
Yes, you can ! If your server is not able to directly reach the Airbrake servers you can configure the Airbrake java notifier...
Read more >
JavaScript - Airbrake Docs
Installing Airbrake in a JavaScript application. ... First, initialize the notifier with the project ID and API key taken from Airbrake:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found