Skip to content

Handle CORS errors with client side GQL calls  #1077

@krzysztofwolski

Description

@krzysztofwolski

https://docs.saleor.io/docs/3.x/developer/extending/apps/developing-apps/troubleshooting#client-side-graphql-requests-are-rejected-due-to-cors-error

When the Cloud instance has CORS allow list set up, GQL calls the app iFrame will be blocked. Most of our communication is done server-side, but long-running jobs are affected by this issue.

### Tasks
- [ ] Detect CORS-related errors in the app
- [ ] Present a message to the user about why the operation cant be performed and how to change the cloud settings to resolve the issue
- [ ] [To be discussed] CORS settings can be detected before the import operation is even triggered, so we can add banner on the main page of the app configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions