Skip to content

UserController: fall back to frontend when user isn't found

Alex Gleason requested to merge userfeed-fe-fallback into develop

Fixes #2730 (closed)

When /users/:nickname is accessed through the browser and a user is found, it renders the frontend with metadata.

When a user isn't found (or is remote), it returns a JSON response like this:

Screenshot_from_2021-08-17_18-34-44

Returning JSON in this case is not the desired behavior. We want it to fall back on the frontend so it can render a "Not found" page there, or render the remote user. This fixes that behavior, and it's needed for Groups to function properly.

When the format is "json" or "activity+json", it continue to render a 404 as expected.

Merge request reports