Skip to content

Commit

Permalink
Update MIGRATING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma4345 committed Nov 27, 2024
1 parent f135aba commit 940b896
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ This driver uses semantic versioning:

## [9.2.0] - 2024-11-27

This is a major release and breaks backwards compatibility.

See [the migration guide](./MIGRATING.md#v9-to-v10) for detailed instructions
for upgrading your code to arangojs v10.

### Changed

- Errors encountered before a request completes are now wrapped in a
Expand Down
18 changes: 18 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Migrating

## v9 to v10

Version 10 changes the error handling to make it easier to diagnose network
issues and distinguish between different error conditions.

If you previously inspected errors other than `ArangoError` and `HttpError`
directly, you should now expect to see `NetworkError` or a subclass thereof
instead. The originating error can be found using the `cause` property of the
`NetworkError` error:

```js
try {
await db.collection("my-collection").get();
} catch (err) {
if (err instanceof NetworkError) console.log(err.cause);
}
```

## v8 to v9

Version 9 reverts the automatic NFC normalization introduced in v7.7.0. This
Expand Down

0 comments on commit 940b896

Please sign in to comment.