Skip to content

Commit e82fe05

Browse files
committed
translate Handling different errors in different ways section
1 parent 33886a2 commit e82fe05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/reference/react-dom/server/renderToPipeableStream.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,9 @@ const { pipe } = renderToPipeableStream(<App />, {
500500
501501
---
502502
503-
### Handling different errors in different ways {/*handling-different-errors-in-different-ways*/}
503+
### বিভিন্ন ধরনের error বিভিন্ন ভাবে হ্যান্ডেল করা {/*handling-different-errors-in-different-ways*/}
504504
505-
You can [create your own `Error` subclasses](https://javascript.info/custom-errors) and use the [`instanceof`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) operator to check which error is thrown. For example, you can define a custom `NotFoundError` and throw it from your component. Then your `onError`, `onShellReady`, and `onShellError` callbacks can do something different depending on the error type:
505+
আপনি [নিজস্ব `Error` subclasses তৈরি করতে পারেন](https://javascript.info/custom-errors) এবং কোন error throw হয়েছে তা যাচাই করতে [`instanceof`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof) অপারেটর ব্যবহার করতে পারেন। উদাহরণ হিসেবে, আপনি একটি custom `NotFoundError` ডিফাইন করে আপনার component থেকে throw করতে পারেন। তারপর আপনার `onError`, `onShellReady`, এবং `onShellError` callback গুলো error এর টাইপ অনুযায়ী ভিন্ন ভিন্ন কাজ করতে পারে:
506506
507507
```js {2,4-14,19,24,30}
508508
let didError = false;
@@ -541,7 +541,7 @@ const { pipe } = renderToPipeableStream(<App />, {
541541
});
542542
```
543543
544-
Keep in mind that once you emit the shell and start streaming, you can't change the status code.
544+
মনে রাখবেন, একবার shell emit হয়ে এবং streaming শুরু হয়ে গেলে আপনি আর status code পরিবর্তন করতে পারবেন না।
545545
546546
---
547547

0 commit comments

Comments
 (0)