-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RequestError with ERR_INVALID_ARG_TYPE #72
Comments
Hey @RomainCscnLF, apologies for getting back so late. I've attempted to replicate this behaviour, but no luck. I've got a few follow-up questions to help me get further with this: Just to be clear, does this only happens in the production environment? |
My guess at this point is that it's something related to the logic you're using when populating the request parameters, and the way we then handle these invalid requests. For example, in the I can't replicate this behaviour on my end, but I'm curious as to whether you've explored this possibility. |
I tested to replicate this in my dev environment but could not. So I can confirm it is only in my production environment. It happens on all endpoints (not only So even with this simple call |
Hmm, are there any key differences between your production and staging environment? We recently had an issue where an integrator had a similar issue with their integration working fine locally, but not in production. I'm wondering if something similar is happening in your case. |
I don't know enough about the key differences between production and dev environment. I'll check with some of my colleagues. That probably is something similar. |
Hi again @tallosan , Could it be that some headers are missing from the call depending on the environment? |
I traced down the error by adding some logs, our config looks good. I'm now sure that I'm getting the error when I'm calling this method:
I assured myself that
And that returns But I catch the following error:
happening randomly. (ps: I'm using 1.2.0 now) |
The missing headers should give you a different error, so I think it's unlikely. I'll look into it though. Just to be clear, are you saying that the error only happens on this particular method ( I'll see what I can do, but this kind of issue is quite difficult to resolve given the lack of visibility (and rightly so) that we have into your setup. Narrowing this down to one method should help, but unless I'm able to replicate this behaviour I'll still be a bit in the dark. |
Unfortunately, it doesn't seem related to this method in particular. The issue also happens on It looks like an error isn't caught properly. I looked at the code, could it come from the method |
Hello again @tallosan. I rewrote the queries we had using http calls directly, and we're not facing errors anymore. So it looks like it definitely is something on the FYI, we're using AWS on our prod env. |
Hey @RomainCscnLF, I'm following up on @tallosan's investigation. Apparently, the In other words, I think the original error is thrown by one of the Node.js APIs and is wrapped by Got in a custom To move forward, we'd need to have more information on the original error. A stack trace could be very helpful in that regard. You should be able to recover a stack trace using the try {
await client.mandates.find(mandateId)
} catch (e) {
console.log(e.stack)
} Could you communicate that back to us? In addition, could you please share:
|
Hello,
I have (in a production environment only) this kind of error that happens randomly when I try call some methods of the library (using the 1.1.2 version) like the following:
OR
The error:
GOCARDLESS_ERROR
is an internal error name, butRequestError
andERR_INVALID_ARG_TYPE
are returned by GoCardless.Do you know where this could come from? It sometimes works like a charm, but then I will have this error.
The text was updated successfully, but these errors were encountered: