简体   繁体   English

AWS lambda - "errorMessage": "Apple"

[英]AWS lambda - "errorMessage": "Apple"

I keep getting this error when I run a lambda function using node 12.x.当我使用节点 12.x 运行 lambda 函数时,我不断收到此错误。 The function I have has nothing specific to apple- as in push notification etc. Is anyone else facing a similar issue?我拥有的功能没有任何特定于苹果的功能 - 如推送通知等。是否还有其他人面临类似的问题?

Some pointers would be highly appreciated一些指针将不胜感激

{
  "errorType": "string",
  "errorMessage": "Apple",
  "trace": []
}

To reproduce your situation, I did the following:为了重现您的情况,我执行了以下操作:

  • Created an AWS Lambda function via the management console通过管理控制台创建了一个 AWS Lambda 函数
    • Runtime: Node.js 12.x运行时:Node.js 12.x
  • Clicked Test , provided an Event name , clicked Create单击测试,提供事件名称,单击创建
  • Clicked Test点击测试

The function was the default function provided:该函数是提供的默认函数:

exports.handler = async (event) => {
    // TODO implement
    const response = {
        statusCode: 200,
        body: JSON.stringify('Hello from Lambda!'),
    };
    return response;
};

The output was:输出是:

Response:
{
  "statusCode": 200,
  "body": "\"Hello from Lambda!\""
}

The function ran successfully and did not display the message you received.该函数运行成功,但没有显示您收到的消息。

此错误的原因是 API 返回status: 500, statusText:Apple'并且因为我返回了一个Promise reject with statusTextPromise reject with statusText它不断向Apple发送我使用 try 和 catch 解决此问题的请求之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Lambda 错误 - “errorType”:“string”,“errorMessage”:“handled” - AWS Lambda Error - "errorType": "string", "errorMessage": "handled" AWS Lambda Node.js 6.10:“errorMessage”:“找不到模块‘cfn-response’”, - AWS Lambda Node.js 6.10 : "errorMessage": "Cannot find module 'cfn-response'", 错误消息:lambda函数nodejs中的“未定义事件” - errorMessage: “event is not defined” in lambda function nodejs Lambda function 错误消息“:”无法读取未定义的属性“桶” - Lambda function errorMessage“: ”Cannot read property 'bucket' of undefined AWS Lambda到AWS Lambda的权限 - AWS Lambda to AWS Lambda permissions serverless(node-aws)“ TypeError”,“ errorMessage”:“回调不是函数” - serverless(node-aws) “TypeError”,“errorMessage”:“callback is not a function” 运行lambda“ errorMessage”时收到以下错误:“无法读取未定义的属性'requestParameters'”, - Getting the following error when running lambda “errorMessage”: “Cannot read property 'requestParameters' of undefined”, ImportModuleError“,”errorMessage“:”Error: Cannot find module while using Netlify lambda functions with dependencies - ImportModuleError“,”errorMessage“:”Error: Cannot find module while using Netlify lambda functions with dependencies AWS Lambda - MySQL 缓存 - AWS Lambda - MySQL caching WebDriverIO 和 AWS Lambda - WebDriverIO & AWS Lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM