Budibase/budibase · error
There was a problem with the invite
Error message
There was a problem with the invite
What it means
checkInvite looks up an invitation code in the invite cache (cache.invite.getCode). If the lookup throws — meaning the code does not exist, expired, was deleted, or the cache is down — the handler hides the details and returns 400 'There was a problem with the invite'. This endpoint is normally called by the client to resolve which email an invite code belongs to before the user accepts it.
Source
Thrown at packages/worker/src/api/controllers/global/users.ts:650
}
ctx.body = {
message: "User invites successfully removed.",
}
}
export const checkInvite = async (ctx: UserCtx<void, CheckInviteResponse>) => {
const { code } = ctx.params
const tenantId =
typeof ctx.request.query.tenantId === "string"
? ctx.request.query.tenantId
: undefined
let invite
try {
invite = await cache.invite.getCode(code, tenantId)
} catch (e) {
console.warn("Error getting invite from code", e)
ctx.throw(400, "There was a problem with the invite")
}
ctx.body = {
email: invite.email,
}
}
export const getUserInvites = async (
ctx: UserCtx<void, GetUserInvitesResponse>
) => {
try {
// Restricted to the currently authenticated tenant
ctx.body = await cache.invite.getInviteCodes()
} catch (e) {
ctx.throw(400, "There was a problem fetching invites")
}
}
export const addWorkspaceIdToInvite = async (
ctx: UserCtx<void, UpdateInviteResponse, { code: string; role: string }>View on GitHub (pinned to a81a902e9a)
Solutions
- Ask the admin to resend the invitation so a fresh, valid code is generated.
- Ensure the invite link includes the correct tenantId query parameter for multi-tenant deployments.
- Check worker logs ('Error getting invite from code') and cache health if codes should still be valid.
- If the invite was already accepted, simply sign in instead of following the old link.
Example fix
// before: link without tenant context fails lookup
resolveInvite(code)
// after: pass tenantId from the invite URL
resolveInvite(code, new URLSearchParams(location.search).get('tenantId')) Defensive patterns
Strategy: try-catch
Validate before calling
// check the code looks well-formed before hitting the API
if (!code || code.length < 16) {
showError("This invite link appears incomplete — ask for a new invitation")
} Try / catch
try {
const { email } = await api.checkInvite(code, tenantId)
} catch (e) {
if (e?.status === 400) showResendInvitePrompt()
} Prevention
- Accept invites promptly before codes expire or are deleted
- Preserve the tenantId query param in multi-tenant invite links
- Provide a clear 'resend invitation' path in the accept-invite UI
When it happens
Trigger: GET /api/global/users/invite/:code (with optional ?tenantId=) where the code is not found in the invite cache: already accepted, expired and garbage-collected, mistyped, or looked up against the wrong tenantId; also when Redis/invite store is unreachable.
Common situations: User opens an invite email days later after the code was removed; admin deletes pending invites while the user still has the email open; multi-tenant invite link missing the tenantId query param; backend cache outage.
Related errors
- Unable to create new user, invitation invalid.
- Error getting status
- Unable to remove doc without a valid _id and _rev.
- Cannot store document without _id field.
- Configuration invalid. Must contain google clientID and clie
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/1fcdeca944689664.
Report an issue: GitHub.