Only use errors from errors.js for EditWindowHasEnded

This commit is contained in:
Benjamin Goering
2017-05-09 15:02:26 -07:00
parent 096025b72a
commit f37a210479
3 changed files with 11 additions and 9 deletions
-5
View File
@@ -249,11 +249,6 @@ const editComment = async ({user, loaders: {Comments}}, {id, asset_id, edit}) =>
throw new errors.APIError('Comment not found', {
status: 404,
translation_key: 'NOT_FOUND',
});
case 'EditWindowExpired':
throw new errors.APIError('You can no longer edit this comment. The window to do so has expired.', {
status: 401,
translation_key: 'error.editWindowExpired',
});
case 'NotAuthorizedToEdit':
throw errors.ErrNotAuthorized;