Closed bobbytables closed 7 years ago
Hey @bobbytables, you can actually already override the class name when calling Notify
, like this:
honeybadger.Notify(err, honeybadger.ErrorClass{"CustomClassName"})
See the Notify examples section for more info
Would that work instead?
Hi! We currently use Logrus + Hooks to dispatch errors to Honeybadger using the package https://github.com/bobbytables/logrus-honeybadger
We've noticed that the
Class
when using Go typically defaults to*errors.errorString
, usually because of this line: https://github.com/honeybadger-io/honeybadger-go/blob/master/error.go#L50This can be solved by calling
Notify
on the client with thehoneybadger.Error
type where you can set theClass
struct property manually. However, getting the frames for the current stacktrace is an unexported function in this package.So what I'm proposing is to export the function defined here https://github.com/honeybadger-io/honeybadger-go/blob/master/error.go#L55
This would allow generating the
Error
type very easy to pass into theNotify
function.