Skip to content

Commit 940b896

Browse files
committed
Update MIGRATING.md
1 parent f135aba commit 940b896

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ This driver uses semantic versioning:
1616

1717
## [9.2.0] - 2024-11-27
1818

19+
This is a major release and breaks backwards compatibility.
20+
21+
See [the migration guide](./MIGRATING.md#v9-to-v10) for detailed instructions
22+
for upgrading your code to arangojs v10.
23+
1924
### Changed
2025

2126
- Errors encountered before a request completes are now wrapped in a

MIGRATING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Migrating
22

3+
## v9 to v10
4+
5+
Version 10 changes the error handling to make it easier to diagnose network
6+
issues and distinguish between different error conditions.
7+
8+
If you previously inspected errors other than `ArangoError` and `HttpError`
9+
directly, you should now expect to see `NetworkError` or a subclass thereof
10+
instead. The originating error can be found using the `cause` property of the
11+
`NetworkError` error:
12+
13+
```js
14+
try {
15+
await db.collection("my-collection").get();
16+
} catch (err) {
17+
if (err instanceof NetworkError) console.log(err.cause);
18+
}
19+
```
20+
321
## v8 to v9
422

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

0 commit comments

Comments
 (0)