I've encountered a really weird error. I'm using t...
# ask-a-descoper
n
I've encountered a really weird error. I'm using the descope
@descope/node-sdk
package, for backend management functions. When developing locally, (hot reload using
vite
then everything works just fine. But after "production build" in dockerfile deploy and run via docker-compose, then I get this error: (calling simple
client_.management.tenant.searchAll_()
call
Copy code
{
   error: {
     errorCode: 'E111008',
     errorDescription: 'Management key region does not match expected region'
   }
 }
region of management api key is US And I can't enable management key region to allow all...
✅ 1
r
Hi Noam Looks like your management key region (US) doesn’t match the endpoint your SDK is calling in Docker. Locally it works because it defaults to US, but in production the
baseUrl
or env vars differ. Can you confirm env vars of local and production's. US's baseUrl is https://api.descope.com
n
doesn't seem to solve it, even when I pass
https://api.descope.com
as the baseUrl when initializing the client..
Copy code
DescopeClient({
    baseUrl: 'https://api.descope.com/,
    projectId: env.DESCOPECONFIG_PROJECTID,
    managementKey: env.DESCOPECONFIG_MANAGEMENTAPIKEY,
  })
local dev works, even local build and serve works but when running inside docker compose, then doesn't...
r
Hi can you DM me your production project id.