#sayori-api-error

1 messages ยท Page 1 of 1 (latest)

raven tapir
#

Hi there ๐Ÿ‘‹ feel free to post here

thick oar
#

You passed an empty string for 'invoice_settings[rendering_options]'. We assume empty values are an attempt to unset a parameter; however 'invoice_settings[rendering_options]' cannot be unset. You should remove 'invoice_settings[rendering_options]' from your request or supply a non-empty value

#

(sorry, got the details wrong in the original message)

#

In the end we fixed this issue by passing "rendering_options": {}, as part of the invoice_settings dictionary, but it's very weird that we suddenly started running into this issue when no changes were made on our end to our Stripe API code. Do you know if anything changed on the backend?

raven tapir
thick oar
#

Let me pull one up

#

Sorry, still searching - quite noisy in the logs down there, and I don't have a full error response (just the snippet earlier)

raven tapir
#

No worries!

thick oar
#

Can't find any so I'm going to spin up an env in the old code and try to replicate

raven tapir
#

That error is odd if you were able to create these with empty strings before. Our docs say that it's supposed to take an empty object. Do you have a request in your log that shows it was successful before when you were passing an empty string?

thick oar
#

Okay, finally caught one that I just ran on old code: req_6kJueIywCqW2kR

Looking at POST data, it says the body is ``` "invoice_settings": {
"default_payment_method": "pm_1LAdzmGQ5L54VFKVS4DmfVUX",
"custom_fields": "",
"footer": "",
"rendering_options": ""
}

but it looks like those empty strings are all default values here
#

because the only value I'm passing from the backend is default_payment_method. It looks like this is working fine now for some reason

#

Meanwhile, here's a request running on the updated code: req_Uue08sDYQcE3Vi

this one has POST data that says

  "invoice_settings": {
    "default_payment_method": "pm_1LAduDGQ5L54VFKViahoLHmd",
    "custom_fields": "",
    "footer": ""
  }
}```
note the absence of `rendering_options` now (maybe because we pass in an empty dictionary now?)
#

For the record, this log is how we discovered something went wrong - our general signups dropped to near-zero in that afternoon

#

Found a request from further back (06/02) that definitely had the old code, where we were only passing invoice_settings[default_payment_method]: req_x2QZdk7pmZhbxf

#

Finally found the gold for you! Here's a request on 06/09 with the error I pasted earlier: req_nJxriy4Z8iSeG4

#

Double checked with git log that the file making this API call was not changed since 05/10, other than to fix this issue

raven tapir
#

That's incredibly odd, because passing in an empty string works just fine now. I assume a deploy got rolled back after the product team noticed an increase in error rates, but I can't confirm that in real time.

thick oar
#

That makes the most sense here

raven tapir
#

I can check with them if you want, but I'll have to update you async via an email thread. If that's of interest to you, can you open a support email thread and mention my Discord handle (two-shoes)?

thick oar
#

Sounds good! I'll go ahead and do that, thanks ๐Ÿ˜„

raven tapir
#

Sure thing!