You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found this kind of weird behavior in my test case.
Let's recreate the scenario
I do have 2 classes:
API.ts -> which refers to the class where I'm creating the requests.
API-op.ts -> which refers to the class where I'm validating through asserts, expects etc.
Context: There are some dependencies between the methods. I mean, If I want to publish I need first an ID, that ID becomes from a method called postCreateId. Once I have the response body, I'm using that ID to be passed on my postPublishArt method
Pay attention at square brackets because the body parameter requires that ids keys MUST BE array.
What is the error: Like I need just ONE id passed as an array, once I convert that variable and it is sent to the POST method. the POST method is showing up this error:
text:'{"errors":[{"code":"unexpected-exception","details":{"statusCode":500,"error":"invalid input syntax for type timestamp: \\"0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN\\""}}]}'
I think that issue is about chai-http when you send a POST with ARRAY but just passing one parameter.
Let me know if I'm wrong
The text was updated successfully, but these errors were encountered:
Chai-http version: "4.3.0"
I have found this kind of weird behavior in my test case.
Let's recreate the scenario
I do have 2 classes:
API.ts -> which refers to the class where I'm creating the requests.
API-op.ts -> which refers to the class where I'm validating through asserts, expects etc.
Context: There are some dependencies between the methods. I mean, If I want to publish I need first an ID, that ID becomes from a method called postCreateId. Once I have the response body, I'm using that ID to be passed on my postPublishArt method
So.
I have this method on API.ts
So, I'm calling that method on API-op.ts like this:
on Postman the bodyparameter needs to be like this:
Pay attention at square brackets because the body parameter requires that ids keys MUST BE array.
What is the error: Like I need just ONE id passed as an array, once I convert that variable and it is sent to the POST method. the POST method is showing up this error:
I think that issue is about chai-http when you send a POST with ARRAY but just passing one parameter.
Let me know if I'm wrong
The text was updated successfully, but these errors were encountered: