refactor: Improve warnings and error messages to users about sharing (#4687) (no-changelog)

* refactor: Improve warnings and error messages to users about sharing
This commit is contained in:
Omar Ajoue
2022-11-22 13:05:51 +01:00
committed by GitHub
parent 91408dccf5
commit ad6c6f60a1
7 changed files with 33 additions and 24 deletions

View File

@@ -160,7 +160,7 @@ credentialsController.patch(
userId: req.user.id,
});
throw new ResponseHelper.ResponseError(
`Credential with ID "${credentialId}" could not be found to be updated.`,
'Credential to be updated not found. You can only update credentials owned by you',
undefined,
404,
);
@@ -218,7 +218,7 @@ credentialsController.delete(
userId: req.user.id,
});
throw new ResponseHelper.ResponseError(
`Credential with ID "${credentialId}" could not be found to be deleted.`,
'Credential to be deleted not found. You can only removed credentials owned by you',
undefined,
404,
);