aeternity / aesophia_http

ISC License
6 stars 9 forks source link

Remove trailing newline at the end of error messages #80

Closed davidyuk closed 2 years ago

davidyuk commented 3 years ago

In case of error, /compile endpoint responses:

[{
  "message":"Unbound variable baz at line 3, column 32\\n",
  "pos":{ "col":32, "line":3 },
  "type":"type_error"
}, {
  "message":"Unbound variable baz at line 4, column 33\\n",
  "pos":{ "col":33, "line":4 },
  "type":"type_error"
}]

Trailing newline chars look extra, brings to broken output while doing something obvious like response.body.map(({ message })).join('; ')

hanssv commented 2 years ago

The HTTP-compiler does not have its own error message formatting, this should go towards aesophia.

davidyuk commented 2 years ago

The upstream issue is resolved, but seems that the original issue is not fixed here yet.