Skip to content

Commit 6c92c54

Browse files
committed
chore: update error handling
1 parent e047b8b commit 6c92c54

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.1.8-beta-1",
3+
"version": "0.1.8-beta-3",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Hooks/UseDownload/UseDownload.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const useDownload = () => {
5656

5757
toast.success('Downloaded Successfully')
5858
} else {
59-
const jsonResponseError = await response?.json()
60-
showError(new ServerErrors(jsonResponseError))
59+
const jsonResponseError: ServerErrors = await response?.json()
60+
throw new ServerErrors(jsonResponseError)
6161
}
6262
} catch (error) {
6363
showError(error)

0 commit comments

Comments
 (0)