Hi, I'm getting this error when i tried to create ...
# support-questions-legacy
g
Hi, I'm getting this error when i tried to create a new role through User Management Dashboard
Error: SuperTokens core threw an error for a PUT request to path: '/recipe/role' with status code: 500 and message: Internal Error
Any idea what could be the issue. thanks for the help!
r
Hey
What’s the error stack on the backend?
Also, are you self hosting or using managed service?
g
1.)
Copy code
com.supertokens {t: "2024-04-18T11:26:59.415Z", message: "errorHandler: Started", file: "C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\supertokens.js:243:22" sdkVer: "16.7.2"} +0ms

Error: SuperTokens core threw an error for a PUT request to path: '/recipe/role' with status code: 500 and message: Internal Error

    at Querier.sendRequestHelper (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\querier.js:361:27)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Querier.sendPutRequest (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\querier.js:261:40)        
    at async Function.createNewRoleOrAddPermissions (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\recipe\userroles\index.js:58:16)
    at async createRoleOrAddPermissions (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\recipe\dashboard\api\userroles\roles\createRoleOrAddPermissions.js:34:22)
    at async Object.apiKeyProtector [as default] (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\recipe\dashboard\api\apiKeyProtector.js:46:22)
    at async Recipe.handleAPIRequest (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\recipe\dashboard\recipe.js:462:20)
    at async SuperTokens.middleware (C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\supertokens.js:219:46)    
    at async C:\Users\gouta\React Dashboard\express\node_modules\supertokens-node\lib\build\framework\express\framework.js:128:28
2.) self hosted
r
ok, what are the logs in the supertokens core?
the backend sdk logs indicate that the core threw a 500 error. So need to share the logs from that now
g
@rp_st check this file it has logs of the core.
r
Did you modify the db schema for the
roles
table that we have?
@gsj
g
Yes, have added 2 new columns for our internal use.
r
yea, thjats why it's failing
you can add default values to those columns in the sql schema. Then it should work again
g
we need those columns.
okay will try it.
thanks for the quick response.
16 Views