• SysAdmin 86
  • 0 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

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: