Today is a "I call an external service and it should return X, but it gives me Y instead even though I looked at the code and there's no way it should do that" kind of day
-
Today is a "I call an external service and it should return X, but it gives me Y instead even though I looked at the code and there's no way it should do that" kind of day
-
Today is a "I call an external service and it should return X, but it gives me Y instead even though I looked at the code and there's no way it should do that" kind of day
This is the situation:
- There are routes /a and /b which return X and Y respectively
- Both call the same function, but with one parameter different which determines if it's X or Y
- The function filters the data two times (in the database query and afterwards with Array.filter()) to ensure it adheres to the parameter
- I call /b, but it gives me X
- The logs on that service confirm I called /b -
This is the situation:
- There are routes /a and /b which return X and Y respectively
- Both call the same function, but with one parameter different which determines if it's X or Y
- The function filters the data two times (in the database query and afterwards with Array.filter()) to ensure it adheres to the parameter
- I call /b, but it gives me X
- The logs on that service confirm I called /b@volpeon@icy.wyvern.rip function is not called with the correct parameter?
-
@volpeon@icy.wyvern.rip function is not called with the correct parameter?
@eragon The route definition is literally
request.query.type = "Y"; await theFunction(request.params.customer, request.query);
-
@eragon The route definition is literally
request.query.type = "Y"; await theFunction(request.params.customer, request.query);
@eragon I bet the query object is readonly. I'll tell the guy who developed the service
-
This is the situation:
- There are routes /a and /b which return X and Y respectively
- Both call the same function, but with one parameter different which determines if it's X or Y
- The function filters the data two times (in the database query and afterwards with Array.filter()) to ensure it adheres to the parameter
- I call /b, but it gives me X
- The logs on that service confirm I called /b -
This is the situation:
- There are routes /a and /b which return X and Y respectively
- Both call the same function, but with one parameter different which determines if it's X or Y
- The function filters the data two times (in the database query and afterwards with Array.filter()) to ensure it adheres to the parameter
- I call /b, but it gives me X
- The logs on that service confirm I called /b@volpeon you
forgot one crucial element: software is inherently evil -
@eragon I bet the query object is readonly. I'll tell the guy who developed the service
@eragon@pl.eragon.re @volpeon@icy.wyvern.rip Javascript, amirite bois?
-
This is the situation:
- There are routes /a and /b which return X and Y respectively
- Both call the same function, but with one parameter different which determines if it's X or Y
- The function filters the data two times (in the database query and afterwards with Array.filter()) to ensure it adheres to the parameter
- I call /b, but it gives me X
- The logs on that service confirm I called /bI found the problem, and then another one. And now it returns an error 500 with the description "[Object object]". I don't think this part of the service was in any use before
-
I found the problem, and then another one. And now it returns an error 500 with the description "[Object object]". I don't think this part of the service was in any use before
Also my colleague who wrote this clearly took inspiration from Go. A lot of parts are
let [result, err] = call(); if (err) { throw err; }