Errors

Writing Errors

When handling a Dendron specific error, use the DendronError class

Some things to keep in mind:

  • when returning an error from the server, note that you'll need to convert the error to a plain object using error2PlainObject
  • when displaying an error in a string, you'll need to convert the error using stringifyError
  • whenever possible, attach a status to an error
  • whenever possible, attach a severity to an error

Reading Errors