Skip to content

Commit

Permalink
updated JS client CHANGELOG.md for upcoming Ditto 3.0.0 release
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle committed Sep 27, 2022
1 parent 38c77fd commit 5955dc2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
40 changes: 35 additions & 5 deletions javascript/CHANGELOG.md
@@ -1,16 +1,46 @@
# Changelog
All notable changes to the Ditto JavaScript client will be documented in this file.

## [3.0.0] - 2022-09-xx
## [3.0.0] - 2022-09-28

### Updated dependencies
TODO text
### Dependencies

No dependencies were explicitly updated.

### \#169 Improved error handling for HTTP rejections
TODO text

Error handling for the Ditto JavaScript client did not return the status code.
And if the error response was not JSON formatted, the error could not be parsed and `undefined` was resolved as `error`.

This has been fixed by adding an ErrorResponse which is returned instead:
```typescript
interface ErrorResponse {
/** The status code of the error response. */
status: number;
/** The body of the error response. */
body: any;
/** The headers of the error response inside a map. */
headers: Map<string, string>;
}
```

### \#193 Preserve headers when responding to messages
TODO text

The `DittoHeaders` of a message were not preserved when subscribing to consume messages via the Ditto JavaScript client.
Without access to the headers and the contained `correlation-id` it was not possible to send back a correlated
response message.

This has been fixed. The headers are now available when e.g. using the API in such a way:
```typescript
const messages = client.getMessagesHandle();
await messages.requestMessages();
messages.subscribeToThing(thingId, (msg) => {
console.log(msg.headers);
console.log(msg);
});
```



## [2.4.0] - 2022-04-14

Expand Down
4 changes: 2 additions & 2 deletions javascript/lib/node/package.json
Expand Up @@ -22,13 +22,13 @@
},
"devDependencies": {
"@types/jest": "^26.0.24",
"@types/prettier": "<2.6.0",
"@types/node": "^14.18.27",
"@types/prettier": "<2.6.0",
"@types/ws": "^7.4.7",
"barrelsby": "^2.1.1",
"jest": "^26.6.3",
"ts-jest": "^26.5.6",
"nock": "^13.0.11",
"ts-jest": "^26.5.6",
"tslint": "^5.18.x",
"tslint-config-airbnb": "^5.11.1",
"tslint-sonarts": "^1.8.0",
Expand Down

0 comments on commit 5955dc2

Please sign in to comment.