Skip to content

Add error handling to handler class + implement in handlers

Jared Pereira requested to merge errorHandlingInBridger into master

Feature Merge Request

Related Issue

Description of Feature

This adds ErrorHandling AKA text messages when returning false, in Handlers. This is implemented in all the current handlers so you can check them out.

Motivation and Context

We want to provide accurate feedback when things fail and maybe operate on them. This distinguishes between exceptions (which should be caught manually) and known errors, which can be returned with the types specified.

Screenshots, Code, Links

export type Result<Errors> = {
  valid: true
} | {
  valid: false
  error: Errors
}

This is the result type which is now returned by the verify function in each handler.


Merge request reports