INL / corpus-frontend

BlackLab Frontend, a feature-rich corpus search interface for BlackLab.
16 stars 7 forks source link

Display stack traces when BlackLab returns one #459

Closed KCMertens closed 7 months ago

KCMertens commented 1 year ago

Re: https://github.com/INL/corpus-frontend-config/issues/116#issuecomment-1757404044

BlackLab can add a special stackTrace key to the error response for specific IP addresses. Maybe only show this when the frontend is in debug mode though? (which can be enabled at any time by entering debug.enable() in the browser console).

jan-niestadt commented 1 year ago

BLS will only return stackTrace when the client performing the request is in the configured list of debug IPs. So I don't think extra steps are needed/desired, you can just show it if it's returned by BlackLab.

KCMertens commented 7 months ago

We do this now: https://github.com/INL/corpus-frontend/blob/40f61930d1aaae83b986f04abb7e4c9022667152/src/frontend/src/api/apiutils.ts#L57