tom-and-the-toothfairies / pathways

:older_woman: :hospital: :pill: :pill:
https://tomandthetoothfairies.info/
5 stars 0 forks source link

improve Parser/Lexer errors #171

Closed c-brenn closed 7 years ago

c-brenn commented 7 years ago

Now that we have the nice line highlighting, we could highlight the line that caused the error.

All errors returned from Panacea have the form:

{
  "error": {
    "status_code": "http status code",
    "title": "string summarising the error",
    "detail": "string explaining the specific error",
    "meta": "object containing error specific metadata"
  }
}

We should return the line number as part of the metadata for the error. This should be relatively straight-forward.