Hi Again; I am running into the following error w...
# prefect-server
j
Hi Again; I am running into the following error when registering flows on CI (works perfectly from my local machine);
Copy code
prefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: http://<REDACTED>:4200/graphql

The following error messages were provided by the GraphQL server:

    GRAPHQL_VALIDATION_FAILED: Cannot query field "user" on type "Query".

The GraphQL query was:

    query {
            user {
                default_membership {
                    tenant {
                        slug
                }
            }
        }
    }

The passed variables were:

    null
The flow is registered - new version becomes available but the exception obvs fails my CI
There is a gh issue thats similar - but was supposed to have been fixed (but also it doesn't happen locally...) https://github.com/PrefectHQ/prefect/issues/4179
n
My guess here would be that the CI process running the Prefect commands needs to know it's pointed at a Server instance and not Cloud
Locally you likely have the config all sorted but it's possible that the CI process doesn't have the correct config
As part of that CI, are you running
prefect backend server
?
j
Yep! Thats it! Thanks!
n
Great! 😄
j
So why didn't it completely error out?
Seems like a bad idea to register it and then throw the error?
n
Hm that part I'm not certain of; it's possible the other parts of the config are fine but this was a downstream fetching of the user (which doesn't exist in Server)
j
Thanks anyway!
n
In other words: the error didn't impact registration but rather a different query the client was trying to make