mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Only use errors from errors.js for EditWindowHasEnded
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user