0

Kinvey を使い始めたばかりで、REST API 経由でデータを POST する際に問題が発生しています。データストアに移動すると保存できますが、POST 経由で送信すると機能しません。

データを投稿するには、URL 「/appdata/APP_KEY/DATASTORE/」を使用し、ヘッダーでAuthorizationX-Kinvey-API-VersionContent-Type を送信しています。
そして、「ビジネスロジックコードの処理で不明な内部エラーが発生しました」と返ってきます。

ビジネス ロジックを App Engine に追加すると (しばらくの間、Kinvey に status=200 が返されるだけです)、同じエラーが発生します。

{
  "error": "BLInternalError",
  "description": "The Business Logic script did not complete. See debug message for details.",
  "debug": "An unknown internal error occured in the processing of the Business Logic code."
}

誰かが私がどこで間違っているのか知っていますか?

最後に、Kinvey を GET 経由で呼び出す場合でも、Kinvey が App Engine を呼び出すメソッドは POST ですが、変更する方法はありますか?

エラーにもかかわらず、Google App Engine には常にアクセスのログがあります。

ありがとうございました!

4

1 に答える 1

1

Kinvey のサポートにメールを送ったところ、とても助かりました。私の間違いのいくつか:

  1. 私が返していた JSON は間違っていました [*];
  2. 応答のヘッダーに Content-Type と status を追加しませんでした。

今では完璧に動作します!

[*] 応答の本文で返す JSON は次のとおりです。

{
    "request": {
        "method": "<redacted>",
        "username": "<redacted>",
        "entityId": "<redacted>",
        "collectionName": "<redacted>",
        "headers": {
            "connection": "<redacted>",
            "host": "<redacted>",
            "x-forwarded-for": "<redacted>",
            "x-forwarded-port": "<redacted>",
            "x-kinvey-api-version": "<redacted>",
            "x-real-ip": "<redacted>",
            "authorization": "<redacted>",
            "x-forwarded-proto": "<redacted>"
        },
        "body": "<redacted>",
        "params": "<redacted>"
    },
    "response": {
        "complete": True,
        "headers": {
            "x-powered-by": "<redacted>",
            "x-kinvey-api-version": "<redacted>",
            "x-kinvey-request-id": "<redacted>"
        },
        "body": {},
        "error": None,
        "statusCode": 200
    }
}

Kinvey サポートの Brian に再び感謝します!

[]の

于 2013-09-17T05:00:10.350 に答える