Skip to content

Commit 4fc2d55

Browse files
hive-botclaude
andcommitted
docs: fix the DocumentTranslationError comment and a strict-mode README example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 477a196 commit 4fc2d55

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,11 @@ const fetched = await deeplClient.getStyleRuleCustomInstruction(rule, instructio
792792

793793
// Update a custom instruction
794794
const updated = await deeplClient.updateStyleRuleCustomInstruction(
795-
'YOUR_STYLE_ID', instruction.id, 'Updated label', 'Use very formal language');
795+
'YOUR_STYLE_ID', instruction, 'Updated label', 'Use very formal language');
796796

797797
// Delete a custom instruction
798798
await deeplClient.deleteStyleRuleCustomInstruction(
799-
'YOUR_STYLE_ID', instruction.id);
799+
'YOUR_STYLE_ID', instruction);
800800
```
801801

802802
#### Deleting a style rule

‎src/errors.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ export class ConnectionError extends DeepLError {
3838
}
3939

4040
/**
41-
* Thrown by translateDocument() for any failure except a missing input file. The cause is in
42-
* `error`; `httpStatusCode` and `shouldRetry` are copied from it when it is a DeepLError.
41+
* Thrown by translateDocument() for any failure, including a missing input file, except an
42+
* existing or unwritable output path (the Node error) and a failed minification
43+
* (DocumentMinificationError). The cause is in `error`; `httpStatusCode` and `shouldRetry` are
44+
* copied from it when it is a DeepLError.
4345
*/
4446
export class DocumentTranslationError extends DeepLError {
4547
public readonly documentHandle?: DocumentHandle;

0 commit comments

Comments
 (0)