{"record":{"id":"08ea1dae9d62e16c","repo":"jumpserver/jumpserver","slug":"response-body-message","errorCode":null,"errorMessage":"response.body.message","messagePattern":"response\\.body\\.message","errorType":"exception","errorClass":"JMSException","httpStatus":null,"severity":"error","filePath":"apps/common/sdk/sms/alibaba.py","lineNumber":53,"sourceCode":"        config.endpoint = 'dysmsapi.aliyuncs.com'\n        self.client = Dysmsapi20170525Client(config)\n\n    def send_sms(self, phone_numbers: list, sign_name: str, template_code: str, template_param: dict, **kwargs):\n        phone_numbers_str = ','.join(phone_numbers)\n        send_sms_request = dysmsapi_20170525_models.SendSmsRequest(\n            phone_numbers=phone_numbers_str, sign_name=sign_name,\n            template_code=template_code, template_param=json.dumps(template_param)\n        )\n        try:\n            logger.info(f'Alibaba sms send: '\n                        f'phone_numbers={phone_numbers} '\n                        f'sign_name={sign_name} '\n                        f'template_code={template_code} '\n                        f'template_param={template_param}')\n            response = self.client.send_sms(send_sms_request)\n            # 这里只判断是否成功，失败抛出异常\n            if response.body.code != 'OK':\n                raise JMSException(detail=response.body.message, code=response.body.code)\n        except TeaException as e:\n            if e.code == 'SignatureDoesNotMatch':\n                raise JMSException(code=e.code, detail=_('Signature does not match'))\n            raise JMSException(code=e.code, detail=e.message)\n        return response\n\n\nclient = AlibabaSMS\n","sourceCodeStart":35,"sourceCodeEnd":62,"githubUrl":"https://github.com/jumpserver/jumpserver/blob/6ec464fabd61b95912d539455a3a5f15f5c59fe0/apps/common/sdk/sms/alibaba.py#L35-L62","documentation":"JMSException raised in AlibabaSMS.send_sms() when the Alibaba Cloud SMS API responds but response.body.code is anything other than 'OK'. The detail is the provider's own message (e.g. insufficient balance, invalid template, frequency limit) and the code is the Alibaba error code.","triggerScenarios":"send_sms() invoked with an unapproved sign_name, an invalid/inactive template_code, phone numbers in a region not covered, hitting SMS send frequency limits, or an account with insufficient balance — Alibaba returns codes like isv.BUSINESS_LIMIT_CONTROL, isv.SMS_SIGNATURE_ILLEGAL, or isv.AMOUNT_NOT_ENOUGH.","commonSituations":"New Alibaba SMS setup where the signature/template is still pending approval; production traffic hitting FlowControl limits; template_param variables not matching the template's declared placeholders; account balance exhausted.","solutions":["Match the returned response.body.code against Alibaba's SMS error code table and address the specific cause","Verify sign_name and template_code exactly match the approved values in the Alibaba console (case-sensitive)","Ensure template_param keys match the template's variable placeholders","Check account balance and request quota/rate-limit increases for production volume"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if not sign_name or not template_code:\n    raise ValueError('sign_name and template_code required for alibaba backend')","typeGuard":null,"tryCatchPattern":"try:\n    sms.send_sms(numbers, sign, tmpl, params)\nexcept JMSException as e:\n    if str(getattr(e, 'code', '')).startswith('isv.'):\n        handle_alibaba_error_code(e.code)  # map provider code to user message\n    raise","preventionTips":["Keep sign/template approved and matching console values exactly","Validate template_param keys against template placeholders","Watch provider balance and quota dashboards"],"tags":["alibaba","sms","template-validation","rate-limit"],"backgroundTag":"sms-provider-rejection","analyzedSha":"6ec464fabd61b95912d539455a3a5f15f5c59fe0","analyzedAt":"2026-08-28T11:33:00.925Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}