forked from Silverfish/proton-bridge
fix(GODT-2390): Add reports for uncaught json and net.opErr
Report to sentry if we see some uncaught network err, but don't force the user logout. If we catch an uncaught json parser error we report the error to sentry and let the user be logged out later. Finally this patch also prints the error type in UserBadEvent sentry report to further help diagnose issues.
This commit is contained in:
@ -179,3 +179,14 @@ type IMAPLoginFailed struct {
|
||||
func (event IMAPLoginFailed) String() string {
|
||||
return fmt.Sprintf("IMAPLoginFailed: Username: %s", event.Username)
|
||||
}
|
||||
|
||||
type UncategorizedEventError struct {
|
||||
eventBase
|
||||
|
||||
UserID string
|
||||
Error error
|
||||
}
|
||||
|
||||
func (event UncategorizedEventError) String() string {
|
||||
return fmt.Sprintf("UncategorizedEventError: UserID: %s, Source:%T, Error: %s", event.UserID, event.Error, event.Error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user