Skip to content

Commit

Permalink
Merge pull request #53 from marioskranitsas/fix-issue--39
Browse files Browse the repository at this point in the history
fix error code when deleting resources
  • Loading branch information
rootelement authored Dec 19, 2020
2 parents 940b0a0 + 773fa72 commit a1e5cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/ResourceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ async function deleteResource (currentUser, resource) {
undefined)

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

await ret.delete()
Expand Down

0 comments on commit a1e5cc6

Please sign in to comment.