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 send a POST request to a API server and the request sent 2 times. The initial request succeed because the records are inserted in the database then I get HTTP 500 response from the server. I have attached the error response and added the payload request. In the forms I have deleted the some of the inputs to make it readable here.
Debug Console Preview Tab
resource: [{code: "23000",…}]
0: {code: "23000",…}
code: "23000"
message: "SQLSTATE[23000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Violation of PRIMARY KEY constraint 'PK_Customers'. Cannot insert duplicate key in object 'dbo.Customers'. The duplicate key value is (James-1520). (SQL: insert into [dbo].[Customers] ([CustomerID], [SalesPerson], [LabName], [CreatedBy], [Deleted]) values (James-1520, 0, 1, James, James, Dr, , Kwaku Clinic, 115 Ave, Toronto, AB, M5B 2P7, , Canada, 6833733, james@test.com, More, 1, Prospects Form, 0))"
trace: [,…]
message: "Batch Error: Not all requested records could be created."
status_code: 500
I am also getting an issue similar to this. Using the most recent version of axios in Node.js (0.27.2), rarely when querying an API it will send 2 requests and cause a race condition on the API's server which ends up resulting in axios receiving the response as a 401 error as, of the two requests that were sent, the 401 returned before the 201.
This is very annoying issue and over the past week of testing, I have observed this twice in about ~80 cases for this single API which is not quite good enough for a production environment (see attached screenshot of result showing up on the API server logs)
I send a POST request to a API server and the request sent 2 times. The initial request succeed because the records are inserted in the database then I get HTTP 500 response from the server. I have attached the error response and added the payload request. In the forms I have deleted the some of the inputs to make it readable here.
Debug Console
Preview Tab
Server Logs
[2022-06-30T16:34:27.114490+00:00] local.INFO: [RESPONSE] {"Status Code":500,"Content-Type":null}
[2022-06-30T16:34:27.115436+00:00] local.INFO: [RESPONSE] {"Status Code":200,"Content-Type":null}
**Example code **
Base URL
Form
Expected behavior
Expect only 1 request to be sent
Response of 200
Environment
Screenshots
The text was updated successfully, but these errors were encountered: