Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

27.0 KB
Raw Blame
import { PAIRING_INPUT_PROBLEM_TEXT } from "../shared/pairing-code.ts";
import { redactParams } from "../shared/redact.ts";
import { formatServerText, type ServerErrorBody, type ServerTextParams } from "../shared/server-text.ts";

/** The client translates by key and falls back to this English, which the server keeps sending for older clients. */
export const USER_ERROR = {
  "serverError.pair.codeWrong": "pairing code is wrong or has expired; create a new one on the server",
  "serverError.pair.tooMany": "Too many wrong codes. Try again at {time}.",
  ...PAIRING_INPUT_PROBLEM_TEXT,
  "serverError.pair.linkExpired": "this sign-in link has expired or was already used",
  "serverError.email.invalid": "enter a valid email address",
  "serverError.email.codeFormat": "enter the 8-digit code from the email",
  "serverError.email.tooMany": "too many attempts; wait a minute and request a new code",
  "serverError.email.codeWrong": "that code is wrong or has expired; request a new one",
  "serverError.email.notAllowed": "this email is not on this server's sign-in list; ask the server's owner to add it",
  "serverError.email.unavailable": "the sign-in service could not be reached ({detail}); try again in a moment",
  "serverError.email.notSetUp": "email sign-in is not set up on this server; use a pairing code",
  "serverError.signIn.tooMany": "too many failed sign-in attempts from your address; try again in {seconds}s",
  "serverError.cloud.personal": "My Cloud is personal: only your own devices can connect.",
  "serverError.seats.full": "This server's plan has {seats} seats, and {used} people can already sign in. Add seats from your MausBot account, then invite again.",
  "serverError.model.botBusy": "the bot is working — stop it before changing models",
  "serverError.model.accountUpdating": "this provider account is being updated — try again shortly",
  "serverError.chat.busyEdit": "the thread is working — stop it before editing",
  "serverError.chat.busyVersion": "the thread is working — stop it before switching versions",
  "serverError.forkBusy": "Wait for this conversation to finish before forking it.",
  "serverError.forkNoText": "This conversation has no text message to fork from yet.",
  "serverError.emailDraft.notHere": "That draft is not in this conversation.",
  "serverError.emailDraft.alreadySent": "This email was already sent.",
  "serverError.emailDraft.busy": "This draft is still being saved.",
  "serverError.emailDraft.appsOff": "Connected apps are off for this bot.",
  "serverError.emailDraft.ownGmail": "Connect your own Gmail in Apps to save this draft.",
  "serverError.emailDraft.appsDown": "Apps can't be reached right now. Try again in a few minutes.",
  "serverError.emailDraft.notAllowed": "{name} may not save Gmail drafts. Change its app permissions to allow it.",
  "serverError.emailDraft.unreachable": "Gmail couldn't be reached through Apps (HTTP {status}). Try again in a few minutes.",
  "serverError.emailDraft.refused": "Gmail refused: {detail}",
  "serverError.emailDraft.changed": "This draft changed in Gmail since you started editing, so nothing was saved. The card now shows the latest version: edit it again.",
  "serverError.emailDraft.unreadable": "Gmail didn't say what this draft holds now, so nothing was saved. Try again in a few minutes.",
  "serverError.chat.busyFresh": "the thread is working — stop it before starting fresh",
  "serverError.chat.questionGone": "this question is no longer available",
  "serverError.chat.askerGone": "the bot that asked this question is no longer available",
  "serverError.chat.routineElsewhere": "this bot is running a routine in another conversation",
  "serverError.chat.busyInRoom": "this bot is working in channel {room}",
  "serverError.chat.answerSent": "That answer is already on its way.",
  "serverError.chat.savingCredential": "this task is securely saving a credential — try again when it finishes",
  "serverError.team.personalMove": "Moving a computer's bots, chats and logins goes to My Cloud only. Nothing personal comes into {team}.",
  "serverError.team.memberLogin": "On {team} only an admin can save a login, and it is then used by every bot in {team}.",
  "serverError.team.signInFirst": "Sign in to {team} in the app first.",
  "serverError.team.ownAppsNeedKey": "Your own apps can't be connected on {team} yet. Ask an admin to add the team's Composio key.",
  "serverError.chat.ownerOrAdmin": "Only the owner or an admin can do that.",
  "serverError.routine.checks": "Choose checks from calendar, mail and runs",
  "serverError.routine.checksRepeat": "Checks need a bot routine that repeats",
  "serverError.routine.access": "Choose read-and-draft access or none",
  "serverError.routine.deliver": "Only a bot routine can deliver to the brief",
  "serverError.team.noSuchPhone": "no such phone",
  "serverError.team.sessionEnded": "Your session ended. Sign in again before creating a pairing code.",
  "serverError.page.roomOrClosed": "Pages from a room or a closed conversation can't be published here.",
  "serverError.page.notHere": "That page is not in this conversation.",
  "serverError.page.fromMcp": "That app came from an MCP server; only a page a bot made can be published.",
  "serverError.page.versionGone": "That version of the page is no longer kept.",
  "serverError.page.notStored": "This app's page is not stored on this computer.",
  "serverError.page.downloadHasFiles": "This page has files beside it, so it can't be saved as one file. Share it for a link instead.",
  "serverError.department.notFound": "No such department",
  "serverError.department.missing": "no such department",
  "serverError.department.nameLength": "Department name must be 1 to 60 characters",
  "serverError.department.nameRule": "Department name must be 1 to 60 characters without control characters",
  "serverError.department.unassignComputer": "Unassign this department's computer before deleting the department",
  "serverError.department.oneChief": "A department can have only one Chief of Staff. Choose one Chief or use a department without one.",
  "serverError.department.memoryChanged": "This department memory changed. Reload it before saving or approving.",
  "serverError.department.shareTooLarge": "This department is too large to share (4 MB). Leave out pictures, starter notes or some skills and try again.",
  "serverError.department.shareSkillClash": "Two bots in this department have different skills named \"{skill}\". Leave that skill out and try again.",
  "serverError.department.shareNoBots": "Add a bot to this department before sharing it.",
  "serverError.department.shareSkillLimit": "A department can share at most {count} skills. Choose fewer skills and try again.",
  "serverError.department.shareBotSkillLimit": "{name} has more than {count} skills. Choose fewer skills and try again.",
  "serverError.department.createFirst": "Create the named department before making a Chief responsible for it",
  "serverError.department.chiefOnlyExtra": "Only a Chief may manage existing additional departments",
  "serverError.department.confirmExtra": "Confirm additional department access (acknowledgePeerScope)",
  "serverError.department.stopBots": "Stop running bots before granting access to another department, or use the desktop app or a paired Full-access session.",
  "serverError.share.version": "Use a version like 1.2.3.",
  "serverError.preset.empty": "Your New bot defaults are empty. Give them a name, instructions, skills or starter notes first.",
  "serverError.preset.tooLarge": "This preset is too large to share (4 MB). Leave out starter notes or some skills and try again.",
  "serverError.decider.accountRequired": "Add your Cloudflare account ID with the token.",
  "serverError.decider.keyRequired": "Save a Cloudflare Workers AI, Jev or OpenRouter key before turning on fast decisions.",
  "serverError.decider.jevRejected": "Jev rejected this key. Check it at typesafe.ai and paste it again.",
  "serverError.decider.workersRejected": "Cloudflare rejected this token. Check that it has Workers AI permission and belongs to this account ID.",
  "serverError.decider.routerRejected": "OpenRouter rejected this key. Check it at openrouter.ai/keys and paste it again.",
  "serverError.decider.customRejected": "Your endpoint rejected this key. Check it with the endpoint's owner and paste it again.",
  "serverError.decider.baseUrlRequired": "Add the endpoint's base URL (https, or http to this machine) with the key.",
  "serverError.decider.accountId": "A Cloudflare account ID is 32 letters and digits.",
  "serverError.decider.accountFormat": "decider.workersAiAccountId a Cloudflare account ID is 32 letters and digits",
  "serverError.voice.utteranceTooLong": "voice utterances are limited to 500 characters",
  "serverError.goal.alreadyRunning": "A goal is already running in this chat. Stop it before starting another.",
  "serverError.chat.missingConversation": "no such conversation",
  "serverError.place.unsupported": "This works on My Cloud's own page. Open it from the bot's menu.",
  "serverError.place.asleep": "My Cloud is asleep. Send again to wake it.",
  "serverError.place.offline": "My Cloud can't be reached right now. Try again in a moment.",
  "serverError.place.signIn": "This computer isn't signed in to My Cloud. Open My Cloud's page once, then try again.",
  "serverError.department.chiefResponsibility": "Only a Chief of Staff can be made responsible for additional departments",
  "serverError.department.confirmResponsibility": "Confirm which additional departments this Chief is responsible for (acknowledgePeerScope)",
  "serverError.owner.teamOnly": "Only a team's bots report to someone.",
  "serverError.owner.choose": "Choose someone in {team}.",
  "serverError.owner.chiefConflict": "{name} already has a Chief of Staff. Take the crown off one of them first.",
  "serverError.owner.unassignedChiefConflict": "That person already has a Chief of Staff. Take the crown off one of them first.",
  "serverError.owner.departmentAdmin": "Only {team}'s admins can set who a department's bots report to.",
  "serverError.owner.unavailable": "One or more bots are unavailable.",
  "serverError.bot.missing": "no such bot",
  "serverError.owner.personal": "{bot} is {name}'s own MausBot: it always reports to them.",
  "serverError.owner.change": "Only {team}'s admins, or the person {bot} reports to, can change who it reports to.",
  "serverError.helper.ownerOnly": "Only the owner can answer this.",
  "serverError.helper.missing": "There is no such suggestion.",
  "serverError.notification.missing": "no such notification",
  "serverError.phone.list": "Only the owner or an admin can list phones.",
  "serverError.phone.remove": "Only the owner or an admin can remove phones.",
  "serverError.model.defaultAdmin": "forbidden: this session may change this thread's model, not the bot's default (needs the admin scope)",
  "serverError.department.readFailed": "Saved departments and shared instructions could not be read; the existing file was left unchanged",
  "serverError.department.duplicate": "A department with that name already exists",
  "serverError.department.renameBusy": "Stop this department's active work before renaming it",
  "serverError.department.emptyFirst": "Move all bots (including archived bots) and group chats out of this department first",
  "serverError.department.deleteBusy": "Stop this department's active work before deleting it",
  "serverError.department.generalChief": "General already has a Chief of Staff. Move or change this department's Chief before deleting it",
  "serverError.backup.recursiveLink": "Cannot back up a symbolic link to the folder that contains it: {path}",
  "serverError.backup.dataQueryRunning": "{bot}'s Data query is still running and did not stop when asked. Fully quit and reopen OpenMausBot (or restart the hosted server) to stop it, then try again.",
  "serverError.backup.dataCloseFailed": "{bot}'s Data tables could not be closed for the backup ({detail}). Fully quit and reopen OpenMausBot (or restart the hosted server), then try again.",
  "serverError.backup.tooLargeData": "This installation exceeds the 10 GB backup limit; {size} of it is bots' Data tables.",
  "serverError.backup.legacyBursts": "This backup's burst records (bursts.db) are damaged, so nothing was restored and nothing here changed. Make a new backup where it came from.",
  "serverError.setup.noTools": "This bot's AI can't set it up by itself. Tell the bot what you'd like it to do instead.",
  "serverError.setup.missingConversation": "There is no such conversation.",
  "serverError.setup.stopOwner": "Only the person who pressed Set me up, or an owner or admin, can stop it.",
  "serverError.setup.hasInstructions": "This bot already has instructions. To change its job, type /setup and what you'd like it to do.",
  "serverError.setup.started": "This chat has already started. Type /setup and what you'd like this bot to do.",
  "serverError.setup.someoneElse": "Someone else is setting this bot up.",
  "serverError.approval.allThreads": "Finish this bot's approval change first. Every thread's provider must support this approval level.",
  "serverError.approval.pending": "Finish this bot's pending approval change first",
  "serverError.approval.provider": "Use the bot's provider on this thread before applying its approval level",
  "serverError.engineCheck.timeout": "{name} didn't answer within {seconds} seconds.",
  "serverError.request.bodyTimeout": "The request took too long. Check the connection and try again.",
  "serverError.browser.restartingUnresponsive": "The browser stopped responding, so it is being restarted. The live view reconnects by itself.",
  "serverError.computer.desktopOnly": "Only the OpenMausBot app on this computer can let a bot use it. Open the app here, or let the bot work in its own browser or on a cloud desktop instead.",
  "serverError.computer.permissionsThenRestart": "OpenMausBot can't use this computer yet — make sure OpenMausBot has the permissions it asks for, then restart it",
  "serverError.computer.notReadyDetail": "OpenMausBot can't use this computer yet — {reason}",
  "serverError.computer.notReadyMacPermission": "OpenMausBot can't use this computer yet — {reason}. Relaunch OpenMausBot after granting the missing macOS permission.",
  "serverError.install.invalidDetails": "{name}'s install details are invalid. Nothing was downloaded.",
  "serverError.install.versionGone": "This version of {name} is no longer available to download. Update OpenMausBot, then try again.",
  "serverError.install.downloadLimited": "The download site is limiting downloads right now. Try again in a few minutes.",
  "serverError.install.siteNotAnswering": "{name}'s download site isn't answering right now. Try again later.",
  "serverError.install.downloadFailed": "{name} couldn't be downloaded. Check the internet connection and try again.",
  "serverError.install.downloadTooLarge": "The {name} download was larger than expected, so it was stopped. Nothing was installed.",
  "serverError.install.unofficialDownload": "The {name} download did not come from its official site, so it was stopped. Nothing was installed.",
  "serverError.install.redirects": "The {name} download kept redirecting, so it was stopped. Nothing was installed.",
  "serverError.install.safetyCheck": "The {name} download failed its safety check, so nothing was installed. Try again later.",
  "serverError.install.downloadTimeout": "The {name} download took too long and was stopped. Check the internet connection and try again.",
  "serverError.install.unsafeArchive": "The archive contains an unexpected or unsafe file. Nothing was installed.",
  "serverError.install.unsafeFile": "The {name} download holds an unexpected or unsafe file, so nothing was installed.",
  "serverError.install.notPlainFolder": "OpenMausBot's folder for {name} is not a plain folder ({path}), so nothing was changed. Move it away, then try again.",
  "serverError.install.unexpectedFolder": "OpenMausBot's folder for {name} holds something it did not put there ({path}), so nothing was changed. Move it away, then try again.",
  "serverError.install.diskSpace": "There is not enough free disk space to install {name}. Free up about {megabytes} MB, then try again.",
  "serverError.install.openElsewhere": "{name} is open in another window. Close it, then try again.",
  "serverError.install.cannotWrite": "OpenMausBot can't write to its folder for {name}. Check the folder's permissions, then try again.",
  "serverError.install.failed": "{name} couldn't be installed. Try again.",
  "serverError.install.noDownload": "{name} has no download for this computer.",
  "serverError.install.existingDoesNotStart": "{name} is installed, but it doesn't start on this computer ({failure}). Nothing was changed.",
  "serverError.install.programMissing": "The {name} download did not contain the program it should, so nothing was installed.",
  "serverError.install.notSigned": "The downloaded {name} is not signed by its maker, so nothing was installed.",
  "serverError.install.downloadDoesNotStart": "{name} was downloaded, but it doesn't start on this computer ({failure}). Nothing was installed.",
  "serverError.secret.missing": "no such credential request",
  "serverError.secret.settingsCard": "this card saves a key in Settings",
  "serverError.secret.savingFromPhone": "this secret is currently being saved from a phone",
  "serverError.secret.declined": "this request was declined",
  "serverError.secret.replaced": "this request was replaced by a newer one",
  "serverError.secret.taskStopped": "this request stopped with its task",
  "serverError.secret.alreadySaved": "this secret was already saved",
  "serverError.secret.valueSize": "Enter the secret: up to {bytes} bytes.",
  "serverError.secret.notKeptSafely": "The secret could not be kept safely. Nothing was saved.",
  "serverError.secret.unavailableLower": "this credential request is no longer available",
  "serverError.signIn.requestMissing": "no such sign-in request",
  "serverError.signIn.requestReplaced": "this sign-in request was superseded by a newer one",
  "serverError.signIn.answeredInChat": "this sign-in request was already answered in the chat",
  "serverError.signIn.alreadyDone": "this sign-in request was already marked done",
  "serverError.signIn.alreadyCancelled": "this sign-in request was already cancelled",
  "serverError.signIn.expired": "this request already expired",
  "serverError.inbox.answerNotPassed": "That answer can't be passed back.",
  "serverError.room.nameOneLine": "room name must fit on one line",
  "serverError.computer.systemUnsupported": "bots can't use this computer on this system — choose another place for this bot to work",
  "serverError.computer.aiUnsupported": "this bot's AI can't use this computer — pick another AI for this bot, or choose another place for it to work",
  "serverError.wait.alreadyEnded": "This wait has already ended.",
  "serverError.botDefaults.nameLength": "name must be at most 100 characters",
  "serverError.botDefaults.sectionLength": "section must be at most 60 characters",
  "serverError.botDefaults.invalid": "These bot settings are not valid.",
  "serverError.postiz.addressHttps": "Enter your Postiz server's address, starting with https://.",
  "serverError.postiz.addressNoCredentials": "Leave any user name or password out of the Postiz address.",
  "serverError.postiz.addressNoQuery": "Enter the Postiz address without anything after ? or #.",
  "serverError.postiz.addressLocalHttp": "Use an https:// address. Plain http:// works only for a Postiz server on this computer.",
  "serverError.postiz.addressUseHttps": "Use your Postiz server's https:// address.",
  "serverError.postiz.addressContainsKey": "That address has a key in it. Enter the server address alone, and paste the key in its own box.",
  "serverError.postiz.mcpUpdating": "MCP servers are being updated. Try again in a moment.",
  "serverError.setup.mausbotMissing": "no such MausBot",
  "serverError.setup.mausbotOwnerOnly": "only MausBot's own person can do this",
  "serverError.setup.noIntroToFollowUp": "this conversation has no intro to follow up",
  "serverError.inbox.missing": "There is no inbox here.",
  "serverError.inbox.lineMissing": "That line is not in your inbox.",
  "serverError.inbox.answerRequired": "This waits on your answer: answer it, or close it, where it asks.",
  "serverError.instance.settingsInvalid": "Supply a valid CLI path, account name, configuration directory, boolean tools setting or a reply wait of 1 to 60 minutes.",
  "serverError.instance.replyWaitUnsupported": "The reply wait is available for OpenAI-compatible servers only.",
  "serverError.instance.modelsUnsupported": "Model IDs can be changed for added OpenAI-compatible servers only.",
  "serverError.instance.defaultModelRemoved": "{model} is the default model. Choose another default model before removing it from this server.",
  "serverError.mcp.personalHeadersShared": "Personal MCP header values cannot be saved in shared configuration. Save your key in your personal connection.",
  "serverError.mcp.testSignInFirst": "Sign in to the team to test your own connection.",
  "serverError.postiz.adminOnly": "Only the owner or an admin can manage the Postiz connection.",
  "serverError.postiz.keyAlone": "Paste the Postiz API key alone.",
  "serverError.postiz.addressAsText": "Send the Postiz address as text.",
  "serverError.secret.localService": "A local service cannot enter a secret. Enter it in OpenMausBot.",
  "serverError.secret.cloudOwnerOnly": "Only the owner of this Cloud can enter this secret.",
  "serverError.card.cloudOwnerOnly": "Only the owner of this Cloud can answer this card. Chats started by other people always ask the owner first, whatever the bot's access level.",
  "serverError.secret.conversationOwnerOnly": "Only the person this conversation belongs to can enter this secret.",
  "serverError.secret.credentialSavingFromPhone": "this credential is currently being saved from a phone",
  "serverError.secret.credentialDismissed": "this credential request was dismissed",
  "serverError.secret.credentialSuperseded": "this credential request was superseded by a newer one",
  "serverError.secret.notSavedYet": "{label} was not saved yet",
  "serverError.secret.notReadyToResume": "this credential request is not ready to resume",
  "serverError.secret.noLongerConfigured": "{label} is no longer configured",
  "serverError.department.moveChiefConflict": "A department can have only one Chief of Staff. Change the Chief before moving this bot.",
  "serverError.department.membershipChanged": "Department membership changed. Reopen the dialog and try again.",
  "serverError.mcp.addressAsText": "Send the MCP server address as text.",
  "serverError.mcp.addressChanged": "The MCP server address changed. Reload the server and try again.",
  "serverError.attachment.alreadyInMessage": "This file is already in a message, so it stays.",
  "serverError.engine.signedOut": "{name} is signed out.",
  "serverError.bot.viewOnly": "You can view {bot}, not chat with it.",
  "serverError.bot.alwaysAllowFull": "This bot already always-allows {max} tools. Remove one under Access in its settings, then try again.",
  "serverError.share.ownBot": "Chats with your own MausBot stay yours, so they can't be shared.",
  "serverError.share.alreadyTeam": "This conversation is already shared with the team.",
  "serverError.share.notYours": "Only the person this conversation belongs to can share it.",
  "serverError.share.notTeammate": "{name} isn't on this team.",
  "serverError.share.alreadyWith": "This conversation is already shared with {name}.",
  "serverError.share.cantUse": "{name} can't chat with {bot}, so you can't share this with them.",
  "serverError.share.busy": "{bot} is still working here. Share it once it's done.",
  "serverError.share.routine": "A routine is tied to this conversation. Delete the routine first, then share.",
  "serverError.teamMemory.outside": "This conversation came in from outside the team, so nothing from it goes into team memory.",
  "serverError.teamMemory.empty": "Write what to save first.",
  "serverError.teamMemory.notYours": "Only the person who saved this, or an admin, can remove it.",
  "serverError.secret.mailboxAlreadyConnected": "this mailbox was already connected",
  "serverError.secret.emailAndPassword": "Enter your email address and its password.",
  "serverError.secret.emailUnavailable": "Email can't be connected here.",
  "serverError.mailbox.adminOnly": "Only the owner or an admin can manage the mailboxes.",
  "serverError.mailbox.addressAndPassword": "Enter your email address and password.",
  "serverError.mailbox.outgoingFields": "Check the outgoing server: a name like mail.example.com, a port from 1 to 65535, and SSL/TLS or STARTTLS.",
  "serverError.voice.deepseekKeyRequired": "Add a DeepSeek API key in Settings → AI → Other services to talk to your bots with DeepSeek voice.",
  "serverError.voice.fishKeyRequired": "Add a Fish Audio or ElevenLabs key in Settings → AI → Other services to talk to your bots here.",
  "serverError.voice.fishTranscribeConnection": "Couldn't reach Fish Audio to hear you — check your connection.",
  "serverError.voice.elevenLabsTranscribeConnection": "Couldn't reach ElevenLabs to hear you — check your connection.",
  "serverError.file.tooLarge": "This file is {size}, over the {limit} limit for opening files from chat. The file itself is still saved as {name}.",
  "serverError.vps.tooManyCores": "{server} has {cores} CPU cores in all. Choose {cores} or fewer.",
  "serverError.vps.tooMuchMemory": "{server} has about {memory} GB of memory. Choose {memory} GB or less.",
} as const;

export type UserErrorKey = keyof typeof USER_ERROR;

export type UserError = { error: string; errorKey: UserErrorKey; errorParams?: ServerTextParams };

/** Security invariant: params are scrubbed like the English they fill, so a secret survives in neither. */
export function userError(key: UserErrorKey, params?: ServerTextParams): UserError {
  const safe = params && redactParams(params);
  return { error: formatServerText(USER_ERROR[key], safe), errorKey: key, ...(safe ? { errorParams: safe } : {}) };
}

export function userErrorThrown(key: UserErrorKey, params?: ServerTextParams): Error {
  const { error, ...fields } = userError(key, params);
  return Object.assign(new Error(error), fields);
}

export function userErrorFields(value: unknown): Pick<ServerErrorBody, "errorKey" | "errorParams"> {
  const { errorKey, errorParams } = Object(value) as { errorKey?: unknown; errorParams?: unknown };
  if (typeof errorKey !== "string" || !Object.hasOwn(USER_ERROR, errorKey)) return {};
  const params = errorParams && typeof errorParams === "object" && !Array.isArray(errorParams)
    ? redactParams(errorParams as ServerTextParams) : undefined;
  return { errorKey, ...(params ? { errorParams: params } : {}) };
}

/** A refusal another module words in English, with its language-pack key when it is one of these lines word for word. */
export function refusalText(error: string): ServerErrorBody {
  const key = (Object.keys(USER_ERROR) as UserErrorKey[]).find((candidate) => USER_ERROR[candidate] === error);
  return key ? userError(key) : { error };
}

export function refusalBody(refusal: { error: string; errorKey?: string; errorParams?: ServerTextParams }): ServerErrorBody {
  return { error: refusal.error, ...userErrorFields(refusal) };
}