You need to sign in to do that
Don't have an account?
Named Credentials in Batch HTTP Requests work in Sandbox but not Production
I have a batch class with Database.AllowsCallouts that upon execute will invoke a helper method that makes an HTTP Request using Named Credentials. The issue I am facing is that the response returns 200 OK in my sandbox, but 409 Conflict in production (Dropbox API). My remote site settings and named credential configs are exactly the same between sandbox and production.
The funny thing is if I call the helper function in apex anonymous, it works fine. I've tried isolating the problem and I'm sure it's something strange going on with running in Batch context.
Here's my stack trace in sandbox:
And in production:
Formatting problems... Here they are:
Production log:
Sandbox log:
My HTTP Request snippet using named creds: Is there something really simple I'm missing and completely overlooking?