Skip to content

@ethersphere/bee-js v3.2.0

Compare
Choose a tag to compare
@bee-worker bee-worker released this 25 Jan 10:17
88039bb

This is after some time a bigger update that brings some new goodies from Bee 1.4.1 version and improved error handling and support.

↔️ Direct upload support

Bee introduced direct upload mode, where Bee directly pushes the data to the network instead of the intermediate step of locally saving the data and then syncing it with the network. You can enable this behavior by passing deferred = false into UploadOptions interface. When you enable this mode the Promise returned by the upload methods will resolve only once the data is uploaded and synchronized with the network so if you use timeouts you should adjust those base on the size of data you upload.

Currently, the direct upload mode is by default turned off, but it is a plan in the future to enable this behavior by default!

⁉️ Error handling

Now BeeResponseError and BeeRequestError instances contain information about the request (and if applicable also response) that triggered the Error. Also, it has improved for non-JSON responses that were causing unclear errors.

⚠️ Deprecations

In this release, there are two changes in Interface's names that are non-breaking as there are backward compatible aliases, but these aliases will be removed with the next breaking change.

  • Interface DebugPostageBatch was renamed to PostageBatch
  • Interface NodesInfo was renamed to NodeInfo

Features

Bug Fixes

  • handling of non-json responses when json is expected (#508) (8e0962c)
  • rename DebugPostageBatch into PostageBatch (#495) (38f2758)
  • rename NodesInfo into NodeInfo (#493) (9d1ec0a)