Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1e5cc6

Browse files
authoredDec 19, 2020
Merge pull request #53 from marioskranitsas/fix-issue--39
fix error code when deleting resources
2 parents 940b0a0 + 773fa72 commit a1e5cc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/services/ResourceService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ async function deleteResource (currentUser, resource) {
385385
undefined)
386386

387387
if (!ret) {
388-
throw new errors.BadRequestError(`User ${handle || resource.memberHandle} doesn't have resource with roleId: ${resource.roleId} in challenge ${challengeId}`)
388+
throw new errors.NotFoundError(`User ${handle || resource.memberHandle} doesn't have resource with roleId: ${resource.roleId} in challenge ${challengeId}`)
389389
}
390390

391391
await ret.delete()

0 commit comments

Comments
 (0)
Please sign in to comment.