## [Bug] Dev login reports `User not found` when PostgREST database role is missing
Summary
During initial self-host setup, dev login failed with:
User not foundThe actual underlying PostgREST error in the builder log was:
role "anon" does not existThe User table was empty, which initially made User not found appear plausible. However, the dev-login code is supposed to create the user automatically.
After creating the required PostgreSQL anon role and granting the necessary permissions, login immediately succeeded and Webstudio created the user itself.
Problem
The user-visible/authentication error hides the actual infrastructure/database problem.
Suggested improvement
When createOrLoginWithDev() receives a PostgREST error other than the expected zero-row result, surface the underlying PostgREST error or at least report something like:
Database/PostgREST error while looking up userinstead of:
User not foundThis would have reduced troubleshooting considerably.
Source: webstudio-is/webstudio