Dokploy/dokploy · error · Error
${sanitizeRegistryError(execError, response?.password)}
Error message
${sanitizeRegistryError(execError, response?.password)} What it means
Inside updateRegistry, after the DB update a docker login is re-executed with the stored/updated credentials (execAsyncRemote for a bound server, execAsync for cloud-type registries). If the login command fails, a plain Error is thrown whose message is the sanitized docker error (password masked with ***). This inner Error is then caught by the outer catch and re-wrapped as a BAD_REQUEST TRPCError with the same message — so the message you ultimately see IS this sanitized docker output.
Source
Thrown at packages/server/src/services/registry.ts:154
if (
IS_CLOUD &&
!registryData?.serverId &&
registryData?.serverId !== "none"
) {
throw new TRPCError({
code: "NOT_FOUND",
message: "Select a server to add the registry",
});
}
try {
if (registryData?.serverId && registryData?.serverId !== "none") {
await execAsyncRemote(registryData.serverId, loginCommand);
} else if (response?.registryType === "cloud") {
await execAsync(loginCommand);
}
} catch (execError) {
throw new Error(sanitizeRegistryError(execError, response?.password));
}
return response;
} catch (error) {
const message =
error instanceof TRPCError
? error.message
: error instanceof Error
? error.message
: "Error updating this registry";
throw new TRPCError({
code: "BAD_REQUEST",
message,
});
}
};
export const findRegistryById = async (registryId: string) => {View on GitHub (pinned to 546686ea35)
Solutions
- Reproduce manually: echo <password> | docker login <registryUrl> -u <username> --password-stdin on the target server
- Fix/regenerate the credentials and retry the update
- Verify the remote server is reachable if serverId is set
Defensive patterns
Strategy: try-catch
Validate before calling
# verify the new credentials before updating echo "$NEW_PASSWORD" | docker login <registryUrl> -u "$USER" --password-stdin
Type guard
const isLoginFailure = (e: unknown): e is TRPCError => e instanceof TRPCError && e.code === "BAD_REQUEST" && /password|unauthorized|login/i.test(e.message);
Try / catch
try { await updateRegistry(registryId, data); } catch (e) { if (isLoginFailure(e)) { /* message is sanitized docker stderr; fix creds */ } throw e; } Prevention
- Validate credentials with a manual docker login before saving updates
- Note the DB row IS updated even though login failed — re-save after fixing creds
When it happens
Trigger: Updating a registry with new credentials that are wrong/expired, the registry being unreachable, or the bound remote server being offline at update time.
Common situations: Rotated registry tokens not updated in Dokploy, typo in the new password, remote server down when the automatic re-login runs after an update.
Related errors
AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27).
Data as JSON: /api/errors/4b083ec5a7004406.
Report an issue: GitHub.