Skip to content

Conversation

@reynir
Copy link
Collaborator

@reynir reynir commented Dec 11, 2025

With the current behavior we redirect to /not-found on errors in the tenant middleware. One such error is when there is no such tenant. This means when you access the web service with a host name where no tenant is configured it will endlessly redirect to /not-found. This specializes the case when the error is SessionTenantNotFound and renders a not found page. The error message could be improved.

image

Update: after discussion with Yannick the error page is an empty 404 so that we don't reveal to probes what service we run. An error message aimed at operators is logged suggesting what might have gone wrong.

This addresses https://gitlab.uzh.ch/econ/study-coordination/pool/-/issues/312.

@PossessedC0bra
Copy link
Member

@reynir FYI the pipeline fails with formatting errors. Run dune fmt to resolve these issues

@reynir
Copy link
Collaborator Author

reynir commented Dec 11, 2025

Unfortunately it seems ocamlformat does not like mixing attributes and extension points. I'll see if I can massage the attribute so the autoformat is less jarring.

By returning an empty 404 we don't leak information what the web service
provides.

Log a message to console what went wrong and what might need to be done.
For less jarring autoformat(!)
@reynir reynir force-pushed the feature/missing-tenant branch from 5ad0acf to 51da20b Compare December 11, 2025 11:55
@PossessedC0bra PossessedC0bra merged commit c533ef6 into main Dec 19, 2025
7 checks passed
@PossessedC0bra PossessedC0bra deleted the feature/missing-tenant branch December 19, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants