acdh-oeaw / vicav-vue3

Reimplementation of the VICAV Frontend based on Vue.js 3
https://vicav-vue.acdh-ch-dev.oeaw.ac.at
MIT License
0 stars 0 forks source link

Verbose error logging on error page #113

Open ttechnicus opened 6 months ago

ttechnicus commented 6 months ago

As it was discussed in the PR of #102, error.vue should be improved so that a collapsible rendering of the error JSON is shown that the server provides. For example:

{
    "trace": "Q:\/BasexVicav\/webapp\/vicav-app\/vicav.xqm, 124\/18\r\n- Q:\/BasexVicav\/webapp\/vicav-app\/vicav.xqm, 106\/28\r\n- Q:\/BasexVicav\/webapp\/vicav-app\/api-problem.xqm, 41\/26",
    "detail": "test",
    "status": "500",
    "instance": "http:\/\/acdh.oeaw.ac.at\/vicav\/testerror",
    "took": 57.06,
    "title": "testerror: testerror",
    "type": "http:\/\/acdh.oeaw.ac.at\/vicav"
}

Since Nuxt does not provide this automatically (see here), this must be done manually by catching and rethrowing the error.