Skip to content

Commit

Permalink
Merge pull request #254 from privacybydesign/supress-scheme-update-tr…
Browse files Browse the repository at this point in the history
…ansport-errors

Chore: do not report transport errors to Sentry when updating schemes
  • Loading branch information
ivard authored Nov 15, 2023
2 parents 7711118 + 77d1b8e commit ab76b1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Include the cause of Android key store exceptions in Sentry reports
- Do not report transport errors to Sentry when updating schemes

### Fixed
- Stacktraces of native Android errors not parsed correctly
Expand Down
1 change: 1 addition & 0 deletions irmagobridge/event_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package irmagobridge

import (
"fmt"

"github.com/go-errors/errors"
irma "github.com/privacybydesign/irmago"
irmaclient "github.com/privacybydesign/irmago/irmaclient"
Expand Down
5 changes: 5 additions & 0 deletions irmagobridge/receive_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/go-errors/errors"
irma "github.com/privacybydesign/irmago"
)

// DispatchFromNative receives events from the Android / iOS native side
Expand Down Expand Up @@ -78,6 +79,10 @@ func DispatchFromNative(eventName, payloadString string) {
go func() {
defer recoverFromPanic("Handling UpdateSchemesEvent panicked")
err := bridgeEventHandler.updateSchemes()
// Ignore transport errors
if serr, ok := err.(*irma.SessionError); ok && serr.ErrorType == irma.ErrorTransport {
return
}
if err != nil {
reportError(errors.New(err), false)
}
Expand Down

0 comments on commit ab76b1b

Please sign in to comment.