Skip to content

Improving Batch Error Handling + Permission Caching

Compare
Choose a tag to compare
@theodorewahle theodorewahle released this 07 Nov 17:42
· 122 commits to master since this release
a45203c

Batch

  • If you call a batch method (e.g. BatchResponse.tirePressure()) and you never passed the corresponding path (i.e. /tires/pressure) into the .batch() method, BatchResponse.tirePressure() will throw a BatchResponseMissingException.
  • If there is a permission error on a /batch request (i.e. if /charge is not allowed), the request will return a permission error object just for that endpoint within the batch response. Previously, batch requests containing just one permission error would return a permission error for the whole response.

Caching

  • .permissions() and .hasPermissions() now cache their calls to the permissions endpoint