#nukesforbreakfast_error
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1474282760184266753
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Each API request has an associated request identifier, e.g. req_123456789. How do I find the ID for an API request? You can find a log of API requests…
the delete request doesn't show in my workbench logs. I think it was rejected before Stripe gave it a request ID.
https://docs.stripe.com/api/accounts/retrieve Also based on the API reference, this endpoint will throw an error if the account doesn't exist,
yes, I'm saying the type of error changed
It used to give me a PermissionError, now it's returning InvalidRequestError which is causing test failures. I'm trying to figure out if this is an intentinal change or not.
Let me check the changelog
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings -> Business -> Account Details
This is all the response info I have from the request. There is no request ID in the response headers either.
self = <stripe._api_requestor._APIRequestor object at 0x79a3aa2b8690>
rbody = '{\n "error": {\n "message": "The account `acct_1T2lxxPYzTwqH8QF` has been deleted, so we can\'t complete this action. Please let us know via https://support.stripe.com/contact if you think this was a mistake.",\n "type": "api_error"\n }\n}'
rcode = 400
resp = OrderedDict({'error': OrderedDict({'message': "The account `acct_1T2lxxPYzTwqH8QF` has been deleted, so we can't complete this action. Please let us know via https://support.stripe.com/contact if you think this was a mistake.", 'type': 'api_error'})})
rheaders = {'Server': 'nginx', 'Date': 'Fri, 20 Feb 2026 05:09:34 GMT', 'Content-Type': 'application/json', 'Content-Length': '241', 'Connection': 'keep-alive', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Methods': 'GET, HEAD, PUT, PATCH, POST, DELETE', 'Access-Control-Allow-Origin': '*', 'Access-Control-Expose-Headers': 'Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required', 'Access-Control-Max-Age': '300', 'Content-Security-Policy': "base-uri 'none'; default-src 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self'; worker-src 'none'; upgrade-insecure-requests; report-uri https://q.stripe.com/csp-violation?q=GBIWUwDEFfO80jL_mO9C7Ynn5ae24g0UC71Rs5xrifLBDBJftNURIKk6UjpKqjEZF7kEbEuoV9AwfEUW", 'Stripe-Version': '2026-01-28.clover', 'Vary': 'Origin', 'X-Wc': 'ABGHIJ', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload'}
api_mode = 'V1'
The response code is 400, and that's why the SDK raises InvalidRequestError according to https://github.com/stripe/stripe-python/blob/master/stripe/_api_requestor.py#L408
one second
Here is a thread that confirmed the delete API used to return 403s: #dev-help message
it is now returning 400. This is a behavior change, and a breaking one for me.
I'm expecting the 403 to happen when the account is already deleted, but now it's suddenly changed to a 400.
well the issue still remains that the second DELETE results in a PermissionError or 403 status code instead of some other code, like a 404 NOT FOUND.
This is what you mentioned in 2024. You mentioned that you encountered InvalidRequestError when retrieving the deleted account, did you also encounter PermissionError in the second DELETE reqeusts?
it looks like both retrieve and delete used to return 403. I need to confirm what a second delete returns now. One second.
what the hell? Now when I try it again locally I'm getting the PermissionError again for both delete and retrieve.
let me run some additional testing to see if I can isolate this further.
still testing, hold on
ok, I see the behavior now as the following:
First, any requests shortly after the account is deleted seem to return 400 errors now:
(Pdb) stripe_client.v1.accounts.retrieve(stripe_account.id)
*** stripe._error.InvalidRequestError: The account `acct_1T2nJ0B3pyT8iw5i` has been deleted, so we can't complete this action. Please let us know via https://support.stripe.com/contact if you think this was a mistake.
However, after some time, the error changes:
(Pdb) stripe_client.v1.accounts.retrieve(stripe_account.id)
*** stripe._error.PermissionError: The provided key 'sk_test_*********************************************************************************************o4pnVa' does not have access to account 'acct_1T2nJ0B3pyT8iw5i' (or that account does not exist). Application access may have been revoked.
it appears to be on the order of 30 seconds from when the account is deleted is when the error changes from an InvalidRequestError to a PermissionError.
This behavior is inconsistent with previous behavior, and is inconsistent overall since there are two different responses based on when the account is attempted to be retrieved.
So, new reproduction steps:
- create a connected account
- store the account ID
- delete the connected account
- immediately try to retrieve the account by the account ID
- see that a InvalidRequestError is raised
- wait approximately 30 seconds or longer
- try to retrieve the account again
- see that it now raises a PermissionError
Question: Why does the error seem to change over time? Shouldn't it always be the same error?
Thanks for the detailed repro steps. Let me see if I can replicate the same
Ok I am able to reproduce the same. I'll report this issue to the product team.
Ok, how do I follow up on what the expected behavior should be?
I'm going to send you DM, you can use the link to reach out to Stripe support, they will create a case for you so that we can follow up through emails
Hello @leaden arrow, we have sent you a direct message, please check it at https://discord.com/channels/@me/1382214442787541043
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
ok thank you!
Let me know once the ticket is created, so that I can put some notes on it