#nickderobertis

1 messages · Page 1 of 1 (latest)

grim bladeBOT
boreal isle
#

We don't break existing code so that should continue to work for the forseeable future. If we do at some point plan to make changes that would break older code we will make sure to reach out well in advance

#

Also is this a raw REST integration you are writing or is this one of our client libraries? If it is a client library it is possible that it is converting your input to something closer to our reference under the hood

night ridge
#

raw REST integration

#

Thanks, makes sense. I assume this ability is not documented anywhere? I will probably just keep the same logic to convert everything to an array for easier integration with the existing system. I would love to have a docs link I could put in the PR to say it's OK, but makes sense if this is a totally undocumented feature.

boreal isle
#

Checking in to that. Would you mind sending me one of your request IDs (req_123) so I can check some things in our logs?

night ridge
#

sure, give me a minute, i'm not too experienced with the dashboard

boreal isle
#
night ridge
#

req_g4DgZReuauc5M4

boreal isle
#

Interesting, I am seeing them as normal strings on our side. Would you mind sending me your snippet of code where you send them as arrays?

night ridge
#

Hmm, I guess I can also try setting up a proxy to inspect the request to see if the framework is converting single item array to string. The code is split across a few functions, but we are calling:

postData.mapValues(Seq(_))

before sending the data into the post method of the HTTP client (Scala).

boreal isle
#

As far as I can see, we receive the data that way though I'm not 100% sure whether or not there is some processing that happens before the point where I can see it in the logs. Would you be able to set up that proxy and test quickly? If that is a lot of effort I can check in to stuff a bit more on our side

night ridge
#

Actually I see now that this is the type signature for any form data in Scala Play WS: https://www.playframework.com/documentation/2.8.x/ScalaWS#Submitting-form-data

So it's probably doing that. Let me do some more digging. If I can find a request where we are sending an array with multiple items, we can check the Stripe logs to see if it shows up as an array there or not before I go down the proxy route

boreal isle
#

Awesome, thanks for doing the digging there!

night ridge
#

What's the easiest way to search the logs for an endpoint that has an ID embedded? I'm able to filter other API endpoints but it doesn't seem to do a partial search so I'm having trouble finding POST /v1/payouts/$id

#

But for that one we are setting expand[] to a two value sequence

boreal isle
#

Our dashboard accepts * as a wildcard so you could search for /v1/payouts/*

night ridge
#

sweet

boreal isle
#

I don't think we have a way to search by parameters that you send but can help look up log IDs like that if need be.

night ridge
#

We're always sending the same parameters for that endpoint. I just found that indeed expand is resolving to an array there. So I'm pretty sure this is a Scala Play WS thing that it either converts single element arrays to strings, or if you don't put [] at the end of the key it will convert to string. I'll have to do some more testing on that. Anyway, it seems like we are actually calling the Stripe API correctly! So I think that's everything I need from your end. Thanks for your help!