Skip to content


Choose a tag to compare
@timrogers timrogers released this 10 Jul 14:03

For instructions on upgrading from Restforce 4.x to 5.x, see our "Upgrading from Restforce 4.x to 5.x" guide.

Breaking changes

  • ⚠️ Define exception classes for Salesforce errors up-front instead of dynamically at runtime, running the risk that we might miss some errors which should be defined. If any errors are missed, they will be added in patch versions (e.g. 5.0.1). For more details on this change, see the "Upgrading from Restforce 4.x to 5.x" guide (@presidentbeef, @timrogers).
  • ⚠️ Deprecate support for Ruby 2.4, since Ruby 2.4 reached its end-of-life in April 2020 (@timrogers)
  • ⚠️ Change the ancestry of Restforce::UnauthorizedError so it inherits from Faraday::ClientError, not Restforce::Error. This breaking change was required to expose the response body returned by the API as part of this error - see the non-breaking changes entry below for further details (@michaldbianchi).

Non-breaking changes

  • Add support for lostisland/faraday v1.x, whilst maintaining support for v0.9.x (@ryansch)
  • Add #empty? method to Restforce::Collection, returning whether they are any items in a collection (@bubaflub)
  • Allow opting-in to caching on a per-call basis with Restforce::Client#with_caching (@swaincreates)
  • Expose the response body from Salesforce on Restforce::UnauthorizedError and Restforce::NotFoundError (@michaeldbianchi)
  • Remove the unnecessary depending on the json gem, which has been part of the Ruby standard library since v1.9 (@vonTronje)