{"record":{"id":"d560a9a7e3767d83","repo":"RocketChat/Rocket.Chat","slug":"error-push-disabled","errorCode":"error-push-disabled","errorMessage":"Push is disabled","messagePattern":"Push is disabled","errorType":"exception","errorClass":"Meteor.Error","httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/api/v1/push.ts","lineNumber":381,"sourceCode":"\t\t\t\t\ttokensCount: { type: 'integer' },\n\t\t\t\t\t// The admin \"send a test push\" setting renders the outcome straight from this\n\t\t\t\t\t// response, so it carries the i18n key and its interpolation values.\n\t\t\t\t\tmessage: { type: 'string' },\n\t\t\t\t\tparams: { type: 'array', items: { type: 'integer' } },\n\t\t\t\t\tsuccess: {\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tenum: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: ['tokensCount', 'message', 'params', 'success'],\n\t\t\t\tadditionalProperties: false,\n\t\t\t}),\n\t\t},\n\t},\n\n\tasync function action() {\n\t\tif (settings.get('Push_enable') !== true) {\n\t\t\tthrow new Meteor.Error('error-push-disabled', 'Push is disabled', {\n\t\t\t\tmethod: 'push_test',\n\t\t\t});\n\t\t}\n\n\t\tconst tokensCount = await executePushTest(this.userId, this.user.username);\n\t\treturn API.v1.success({ tokensCount, message: 'Your_push_was_sent_to_s_devices', params: [tokensCount] });\n\t},\n);\n\ntype PushTestEndpoints = ExtractRoutesFromAPI<typeof pushTestEndpoints>;\n\ntype PushTokenEndpoints = ExtractRoutesFromAPI<typeof pushTokenEndpoints>;\n\ntype PushGetInfoEndpoints = ExtractRoutesFromAPI<typeof pushGetInfoEndpoints>;\n\ntype PushEndpoints = PushTestEndpoints & PushTokenEndpoints & PushGetInfoEndpoints;\n\ndeclare module '@rocket.chat/rest-typings' {","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/server/api/v1/push.ts#L363-L399","documentation":"Thrown by POST push.test when the server setting Push_enable is not exactly true. This is a Meteor.Error('error-push-disabled', ...) with method context 'push_test', so it returns a structured error body. The endpoint also requires auth, the 'test-push-notifications' permission, and is rate-limited to 1 request/second.","triggerScenarios":"POST /api/v1/push.test while Push_enable is false/unset in Administration > Push, or after disabling push during troubleshooting.","commonSituations":"Admin clicks 'Send a test push' in settings UI before configuring/ enabling the push gateway; push was disabled to debug delivery; fresh install where Push_enable defaults off.","solutions":["Enable push in Administration > Push (set Push_enable = true) and save before calling push.test.","Use GET /api/v1/push.info to check pushGatewayEnabled before attempting the test.","Configure a push gateway (Push_gateway / credentials) so the test actually reaches a device.","If intentionally disabled, remove the UI/automation that triggers push.test."],"exampleFix":"// before - push disabled on server\nawait fetch('/api/v1/push.test', { method: 'POST' });\n\n// after - gate on push.info first\nconst info = await fetch('/api/v1/push.info').then(r => r.json());\nif (!info.pushGatewayEnabled) {\n  throw new Error('Push is disabled; enable Push_enable in admin settings');\n}\nawait fetch('/api/v1/push.test', { method: 'POST' });","handlingStrategy":"validation","validationCode":"// Check push status before triggering the test\nconst info = await fetch('/api/v1/push.info').then(r => r.json());\nif (!info.pushGatewayEnabled) {\n  throw new Error('Push is disabled; enable Push_enable in Administration > Push');\n}\nawait fetch('/api/v1/push.test', { method: 'POST' });","typeGuard":null,"tryCatchPattern":"try {\n  await fetch('/api/v1/push.test', { method: 'POST' }).then(r => r.json());\n} catch (e) {\n  if (e.error === 'error-push-disabled') { /* prompt admin to enable push */ }\n}","preventionTips":["Gate the 'Send test push' UI on push.info's pushGatewayEnabled flag.","Remember push.test is rate-limited to 1 req/sec."],"tags":["push","configuration","settings","rest-api"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}