NexusHub icon indicating copy to clipboard operation
NexusHub copied to clipboard

Add error pages

Open Kaptard opened this issue 7 years ago • 2 comments

I'm submitting a...

  • [ ] Bug report
  • [x] Feature request
  • [ ] Documentation issue or request

Current behavior

Error pages return the raw cubic error responses.


Expected behavior

Should return a proper styled error page.


Minimal reproduction of the problem

Someone gets on an error page. Instead of being all confused what happened, he'll now only be slightly confused of what just happened, since things will at least look like they belong to the page.


Environment

Browser:

  • [ ] Chrome (desktop) version:
  • [ ] Chrome (Android) version:
  • [ ] Chrome (iOS) version:
  • [ ] Firefox version:
  • [ ] Safari (desktop) version:
  • [ ] Safari (iOS) version:
  • [ ] IE version:
  • [ ] Edge version:

For development issues:

  • Node version:
  • Operating System:

Additional Description

Implementing this is probably easiest through cubic-api middleware functions that hijack the res object and check if the statusCode is >= 400. I'd suggest simply going with one generic template. Things will take too much time otherwise.

Kaptard avatar Sep 19 '18 03:09 Kaptard

Note: This will also require a handler in vue-router to work on the client side

Kaptard avatar Apr 17 '19 08:04 Kaptard