You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Trigger any handled exception (e.g. UnauthorizedException) to land on the error/error view.
Click the 'Return to Dashboard' button.
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:
<ath:href="@{/visas/dashboard}" class="btn-back">
Return to Dashboard
</a>
Also remove the stale TODO comment on the line above.
Once Spring Security is wired in, currentUserId will also need to be resolved from the security context rather than passed as a request parameter (see existing deferred work on VisaViewController).
Summary
The 'Return to Dashboard' button in
src/main/resources/templates/error/error.htmluses a hardcoded href of/visa/dashboard, which does not match the actual controller mapping.VisaViewControlleris 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
UnauthorizedException) to land on theerror/errorview./visa/dashboarddoes not exist.Suggested fix
Replace the hardcoded href with a Thymeleaf expression that resolves to the correct path:
Also remove the stale TODO comment on the line above.
Additional context
currentUserIdwill also need to be resolved from the security context rather than passed as a request parameter (see existing deferred work onVisaViewController).Requested by @eeebbaandersson.