"Error: response from url \"/cloudsave/v1/admin/namespaces/<ph>/users/f929a150609a45feac678f107ddd0184/concurrent/records/<ph>\" doesn't match model \"PlayerRecordConcurrentUpdateResponse\"\n at C:\\<ph>\\src\\<ph>\\online-services-monorepo\\node_modules\\@accelbyte\\sdk\\dist\\cjs\\node\\index.cjs:294:23\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async wrapNetworkCallSafely (C:\\<ph>\\src\\<ph>\\online-services-monorepo\\node_modules\\@accelbyte\\sdk\\dist\\cjs\\node\\index.cjs:312:26)\n at async Object.updateConcurrentRecord_ByUserId_ByKey (C:\\<ph>\\src\\<ph>\\online-services-monorepo\\node_modules\\@accelbyte\\sdk-cloudsave\\dist\\index.cjs:1288:18)\n at async OnlineServicesManager.inc<ph>Count (C:\\<ph>\\src\\<ph>\\online-services-monorepo\\packages\\<ph>-game-server\\dist\\online-services-manager.js:115:13)\n at async GameServerConnectionManager.<anonymous> (C:\\<ph>\\src\\<ph>\\online-services-monorepo\\packages\\<ph>-game-server\\dist\\game.js:112:25)"
errors: [
{
code: 'invalid_type',
expected: 'object',
received: 'string',
path: [],
message: 'Expected object, received string'
}
]
The operation looks to be succeeding as the cloudsave data is getting properly updated, but it looks as if though the SDK can’t parse the response.
It would be great if we could have a bit more information to troubleshoot this faster. Where are you running this Typescript code? is this related to Extend code or Game Client code?
As the WebSDK is strongly typed, it appears there’s an issue with an incompatible payload,
Could you let us know which version of Cloudsave you’re currently using? You can find this information by navigating to your domain followed by /cloudsave/version, such as https://demo.accelbyte.io/cloudsave/version.
Additionally, what version of the WebSDK are you on? You can determine this by running the command npm list @accelbyte/sdk-cloudsave in your project directory.
Thanks for the report. Based on your report, we have identified a problem with the WebSDK.
The concurrent endpoints can return two different success responses:
204 - No Content
200 - With response body
However, the WebSDK is validating the response body of HTTP code 200 even when it receives 204 - No Content. As a workaround, we recommend that you use the responseBody query parameter and set it to true. This way, you will always receive a response body with the updated_at value, which you can use for the next concurrent update without fetching the record again.