File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
apps/meteor/app/api/server/v1 Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 11import crypto from 'crypto' ;
22
3+ import { MeteorError } from '@rocket.chat/core-services' ;
34import type { IUser } from '@rocket.chat/core-typings' ;
45import { Settings , Users , WorkspaceCredentials } from '@rocket.chat/models' ;
56import {
@@ -526,21 +527,7 @@ API.v1.addRoute(
526527 Meteor . _debug ( `Exception while invoking method ${ method } ` , err ) ;
527528 }
528529
529- if ( err instanceof Meteor . Error ) {
530- switch ( err . error ) {
531- case 'error-too-many-requests' :
532- return API . v1 . tooManyRequests ( mountResult ( { id, error : err } ) ) ;
533- case 'unauthorized' :
534- case 'error-unauthorized' :
535- return API . v1 . unauthorized ( mountResult ( { id, error : err } ) ) ;
536- case 'forbidden' :
537- case 'error-forbidden' :
538- return API . v1 . forbidden ( mountResult ( { id, error : err } ) ) ;
539- default :
540- return API . v1 . failure ( mountResult ( { id, error : err } ) ) ;
541- }
542- }
543- return API . v1 . failure ( mountResult ( { id, error : err } ) ) ;
530+ throw err ;
544531 }
545532 } ,
546533 } ,
You can’t perform that action at this time.
0 commit comments