Skip to content
This repository was archived by the owner on Jan 10, 2022. It is now read-only.
This repository was archived by the owner on Jan 10, 2022. It is now read-only.

Properly designed error output #69

@ErisDS

Description

@ErisDS

When Ghost encounters an error, we have quite a lot of info that we output. Right now, it's not output in a particularly well designed way.

An error has the following fields:

  • message (describes the error)
  • type (error type e.g. internal error)
  • code (a unique code e.g. UPLOAD_FAILED)
  • help (what to do? docs?)
  • context (context of a request e.g. path of a file which was uploaded)
  • error details (similar to context, basically used for sub error information e.g. theme upload errors)
  • level (normal or critical, how important is an error)
  • stack (stack trace on the server side)

The most useful are:

  • message: what happened / the basic generated error message, often very technical
  • context: any info we have about why or how this happened
  • help: a suggestion, command, or url which should help figure out how to fix it

Then:

  • type & code are useful meta data

Finally:

  • If you’re actively working on Ghost the stack trace is helpful.
  • If you’re a developer working on something else (theme, API integration) error details are probably more relevant.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions