lonely-lockley / archinsight

Simplicity in Code, Power in Design
https://archinsight.org
GNU Affero General Public License v3.0
55 stars 5 forks source link

Server side errors are not displayed anywhere #5

Closed lonely-lockley closed 2 years ago

lonely-lockley commented 2 years ago

If a server-side error in Compiler service happens, web application shows only "Request failed with status code 500" message. Extra information needed here. If we look into a service answer, we can see that it gives extra information about an error:

{
  "message": "Internal Server Error",
  "_links": {
    "self": {
      "href": "/compile",
      "templated": false
    }
  },
  "_embedded": {
    "errors": [
      {
        "message": "Internal Server Error: Unable to compile the source\n[kind=ERROR, line=37, message=variable acl is already defined in class com.github.lonelylockley.archinsight.gen.cp.Container]"
      }
    ]
  }
}

It would be nice to show "message.message" field value to a user.

lonely-lockley commented 2 years ago

Insight code to reproduce this error:

container cont

service test
    name = Test service

service test
    name = Error service