Dokploy/dokploy · error · TRPCError
NOT_FOUND
NOT_FOUND
Error message
Gitlab Provider not found
What it means
Thrown by findGitlabById when the GitLab provider lookup (Drizzle query with gitProvider relation) returns null for the given provider ID. It is a standard NOT_FOUND lookup failure: no git provider row matches the requested id.
Source
Thrown at packages/server/src/services/gitlab.ts:57
.values({
...input,
gitProviderId: newGitProvider?.gitProviderId,
})
.returning()
.then((response) => response[0]);
});
};
export const findGitlabById = async (gitlabId: string) => {
const gitlabProviderResult = await db.query.gitlab.findFirst({
where: eq(gitlab.gitlabId, gitlabId),
with: {
gitProvider: true,
},
});
if (!gitlabProviderResult) {
throw new TRPCError({
code: "NOT_FOUND",
message: "Gitlab Provider not found",
});
}
return gitlabProviderResult;
};
export const updateGitlab = async (
gitlabId: string,
input: Partial<Gitlab>,
) => {
return await db
.update(gitlab)
.set({
...input,
})
.where(eq(gitlab.gitlabId, gitlabId))View on GitHub (pinned to 546686ea35)
Solutions
- Verify the provider ID exists: SELECT * FROM git_provider WHERE id = <id>
- Refresh the provider list in the client to drop stale IDs
- If it should exist, check whether you're connected to the right database/environment
Defensive patterns
Strategy: type-guard
Validate before calling
const providers = await trpc.gitlab.list.query(); const exists = providers.some(p => p.gitProviderId === providerId);
Type guard
const hasGitProvider = (r: unknown): r is GitlabProvider => typeof r === 'object' && r !== null && 'gitProvider' in r;
Try / catch
try { return await findGitlabById(id); } catch (e) { if (e instanceof TRPCError && e.code === 'NOT_FOUND') return null; throw e; } Prevention
- Refetch provider lists after deletions
- Never persist provider IDs across sessions without revalidation
When it happens
Trigger: Calling findGitlabById with a providerId that does not exist in the database — e.g. after the provider was deleted, or a stale ID passed from the client/UI.
Common situations: UI holding a stale provider reference after another team member deleted it, passing a projectId instead of providerId, or querying right after a DB reset/restore.
Related errors
AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27).
Data as JSON: /api/errors/3d1ac780a0659f40.
Report an issue: GitHub.