Nodejs serilization with json service client

I have generated my types via SS cli. all of the API is working except one…
The c# server throw this exception:

  "responseStatus": {
    "errorCode": "SerializationException",
    "message": "Unable to bind to request 'WebHasKremboRequest'",
    "stackTrace": "System.Runtime.Serialization.SerializationException: Unable to bind to request 'WebHasKremboRequest'\n   at ServiceStack.Serialization.StringMapTypeDeserializer.PopulateFromMap(Object instance, NameValueCollection nameValues, List`1 ignoredWarningsOnPropertyNames) in C:\\BuildAgent\\work\\3481147c480f4a2f\\src\\ServiceStack.Client\\Serialization\\StringMapTypeDeserializer.cs:line 133\n   at ServiceStack.Host.Handlers.ServiceStackHandlerBase.DeserializeHttpRequestAsync(Type operationType, IRequest httpReq, String contentType) in C:\\BuildAgent\\work\\3481147c480f4a2f\\src\\ServiceStack\\Host\\Handlers\\ServiceStackHandlerBase.cs:line 161\n   at ServiceStack.Host.Handlers.GenericHandler.CreateRequestAsync(IRequest req, String operationName) in C:\\BuildAgent\\work\\3481147c480f4a2f\\src\\ServiceStack\\Host\\Handlers\\GenericHandler.cs:line 38\n   at ServiceStack.Host.Handlers.GenericHandler.ProcessRequestAsync(IRequest httpReq, IResponse httpRes, String operationName) in C:\\BuildAgent\\work\\3481147c480f4a2f\\src\\ServiceStack\\Host\\Handlers\\GenericHandler.cs:line 85\n",
    "errors": [
        "errorCode": "SerializationException",
        "fieldName": "requestDetails",
        "message": "'[object Object]' is an Invalid value for 'requestDetails'"

[object Object] is an Invalid value for requestDetails even though, in the picture below you can see that it is a real object:


Have a look at the raw HTTP Request/Response headers, the Exception is indicating that an illegal [object Object] value is being sent.

I know, this is why I have attached the nodejs image, you can see the 2 red boxes.
it is indicating that requestDetails a real object (its a debugger view).
One row after that, its a call to the framework. I mean, from my side i see real object, its like the framework is stringify the object

Debugger view doesn’t help, look at the raw HTTP Request/Response headers to view what’s actually being sent.

The only objects you can send with the JsonServiceClient are the generated Request DTOs, is that what you’re trying to send or a naked JS object?

yes, it is coming from dtos.ts

Please post the raw HTTP Request/Response headers as well as the generated DTOs of all Types you’re trying to send. That’s how you’re going to work out the cause of the serialization error.