mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 12:54:55 +00:00
refactor(error): refactor standard throws to non-retryable ApplicationFailure in workflows and activities
This commit is contained in:
@@ -211,7 +211,9 @@ export async function createCommentActivity(params: CreateCommentParams) {
|
||||
where: { id: params.assetId },
|
||||
include: { project: true },
|
||||
})
|
||||
if (!asset || !asset.project) throw new Error('asset or project not found')
|
||||
if (!asset || !asset.project) {
|
||||
throw ApplicationFailure.create({ message: 'asset or project not found', nonRetryable: true })
|
||||
}
|
||||
const teamId = asset.project.teamId
|
||||
|
||||
// Ensure user exists for agent
|
||||
|
||||
Reference in New Issue
Block a user