#72 — [Bug]: Create Profile page doesn’t wait for back-end answer

Repo: Twill-AI/twill-ai-ui State: closed | Status: done Assignee: Unassigned

Created: 2024-10-21 · Updated: 2025-03-11

Description

Steps to reproduce

To reproduce:

  1. In staging login under new user (or remove tenant and profile for existing one through OpenAPI UI).
  2. Open https://fluffy-winner-lm32gle.pages.github.io/. It should show that “you have been verified” and after some loading spinner show “Create profile” page.
  3. Type into field something and press “Continue to connect my apps” button.

What was the expected behavior?

I expected it to go next to Integrations page.

Screenshots

image

and there was Error toast, but it disappears quite fast so wasn’t able to catch it on screenshot.

In browser console I see

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://staging.twillai.com/api/v1/self-management/tenant. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 500.

But Facade’s logs show that everything was OK:

2024-10-21T09:22:53.771600895Z INFO:     10.0.2.51:47146 - "OPTIONS /api/v1/self-management/tenant HTTP/1.1" 200 OK
2024-10-21T09:22:56.187764914Z 2024-10-21 09:22:56.187|INFO|engine_tenant|tenants:440|Tenant 'AlksndrGgl: created PostgreSQL schema 'facade_AlksndrGgl' and user 'user_facade_AlksndrGgl' with read/write access to it.
2024-10-21T09:22:56.650809886Z 2024-10-21 09:22:56.650|INFO|AlksndrGgl|tenants:525|Tenant 'AlksndrGgl': created migration table 'twill_migrations'
2024-10-21T09:22:56.8779

## Notes

_Add implementation notes, blockers, and context here_

## Related

_Add wikilinks to related people, meetings, or other tickets_