Error handling improvements (#71)
* Remove `emperror.dev/errors`, remove all `errors#Wrap` and `errors#WithStack` calls * Improve logging in `server/backup.go`
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
"emperror.dev/errors"
|
||||
"encoding/json"
|
||||
"github.com/gammazero/workerpool"
|
||||
"strings"
|
||||
@@ -69,7 +68,7 @@ func (e *EventBus) Publish(topic string, data string) {
|
||||
func (e *EventBus) PublishJson(topic string, data interface{}) error {
|
||||
b, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return errors.WithStackIf(err)
|
||||
return err
|
||||
}
|
||||
|
||||
e.Publish(topic, string(b))
|
||||
|
||||
Reference in New Issue
Block a user