Skip to content

Fix: error page dashboard link points to wrong path (/visa/dashboard → /visas/dashboard) #40

Description

@coderabbitai

Summary

The 'Return to Dashboard' button in src/main/resources/templates/error/error.html uses a hardcoded href of /visa/dashboard, which does not match the actual controller mapping. VisaViewController is mapped to /visas (plural), so the link results in a 404.

Expected behaviour

Clicking 'Return to Dashboard' on the error page should navigate the user back to the dashboard without error.

Steps to reproduce

  1. Trigger any handled exception (e.g. UnauthorizedException) to land on the error/error view.
  2. Click the 'Return to Dashboard' button.
  3. Observe a 404 response because /visa/dashboard does not exist.

Suggested fix

Replace the hardcoded href with a Thymeleaf expression that resolves to the correct path:

<a th:href="@{/visas/dashboard}" class="btn-back">
    Return to Dashboard
</a>

Also remove the stale TODO comment on the line above.

Additional context

Requested by @eeebbaandersson.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions