Budibase/budibase · error
OAuth2 access token could not be refreshed: ${errorMessage}
Error message
OAuth2 access token could not be refreshed: ${errorMessage} What it means
Error "OAuth2 access token could not be refreshed: ${errorMessage}" thrown in Budibase/budibase.
Source
Thrown at packages/server/src/threads/query.ts:374
configId
)
// Refresh session flow. Should be in same location as refreshOAuthToken
// There are several other properties available in 'resp'
if (!resp.err) {
const globalUserId = getGlobalIDFromUserMetadataID(_id)
await auth.updateUserOAuth(globalUserId, resp)
if (!this.ctx) {
this.ctx = {}
}
this.ctx.user = (await cache.user.getUser({
userId: globalUserId,
})) as SSOUser
} else {
// In this event the user may have oAuth issues that
// could require re-authenticating with their provider.
let errorMessage = resp.err.data ? resp.err.data : resp.err.toString()
throw new Error(
"OAuth2 access token could not be refreshed: " + errorMessage
)
}
return resp
}
async getDynamicVariable(variable: QueryVariable) {
let { parameters } = this
const queryId = variable.queryId,
name = variable.name
let value = await threadUtils.getCachedVariable(queryId, name)
if (!value) {
value = this.queryResponse[queryId]
? this.queryResponse[queryId]
: await this.runAnotherQuery(queryId, parameters)
// store incase this query is to be called again
this.queryResponse[queryId] = valueView on GitHub (pinned to a81a902e9a)
When it happens
Trigger: Thrown at packages/server/src/threads/query.ts:374 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/19f8f5cf218981e0.
Report an issue: GitHub.