Endpoint Error & Stuck, about to take alternate routes :(

时间:2022-08-16 23:07:39

After much struggle and lot of local testing created my endpoint applicaiton, but once I deploy to app engine I getting the following error.

经过多次努力和许多本地测试创建了我的端点应用程序,但是一旦我部署到应用程序引擎,我收到以下错误。

https://ganatest6.appspot.com/_ah/api/taskandtest/v1/alerts?username=g

https://ganatest6.appspot.com/_ah/api/taskandtest/v1/alerts?username=g

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "internalError",
    "message": "Internal Error"
   }`enter code here`
  ],
  "code": 500,
  "message": "Internal Error"
 }
}

Is endpoints not ready for Production?? If so I am stuck and need to find alternate ways.

端点还没有为生产做好准备吗?如果是这样,我被困住了,需要寻找替代方法。

Please help. Here is my code:

请帮忙。这是我的代码:

@Api(
  name = "taskandtest", 
  version = "v1", 
  defaultVersion = AnnotationBoolean.TRUE
)
public class DashboardEP {

  @ApiMethod(name = "taskandtest.alerts", 
             httpMethod = "GET", path = "alerts") 
  public String[] getAlerts(@Named("username") String username) {
    return new String[] {
      "One Alerts Feed"
    };
  }
}

-Gana

-Gana

1 个解决方案

#1


3  

Cloud Endpoints does not support returning scalar types, such as String[], which is the return type in your method.

Cloud Endpoints不支持返回标量类型,例如String [],它是方法中的返回类型。

Instead, you need to use a standard Java bean as your return type.

相反,您需要使用标准Java bean作为返回类型。

#1


3  

Cloud Endpoints does not support returning scalar types, such as String[], which is the return type in your method.

Cloud Endpoints不支持返回标量类型,例如String [],它是方法中的返回类型。

Instead, you need to use a standard Java bean as your return type.

相反,您需要使用标准Java bean作为返回类型。