Skip to content

Commit

Permalink
update time out error notification
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Dec 7, 2023
1 parent 51ebf3d commit 7bf1f00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.4] - 2023-12-07
#### Changed
- errors time out notification

## [2.4.3] - 2023-12-07
#### Changed
- Community link
Expand Down Expand Up @@ -131,7 +135,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Under the hood changes
- Initiated and setup project

[Unreleased]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.3...main
[Unreleased]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.4...main
[2.4.4]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.3...2.4.4
[2.4.3]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.2...2.4.3
[2.4.2]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.1...2.4.2
[2.4.1]: https://gitlab.com/distributed_lab/frontend/react-template/compare/2.4.0...2.4.1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-template",
"private": true,
"version": "2.4.3",
"version": "2.4.4",
"gitHooks": {
"pre-commit": "tsc && yarn lint",
"pre-push": "yarn rsc"
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { RuntimeError } from '@distributedlab/tools'
import * as Sentry from '@sentry/react'
import log from 'loglevel'

import { config } from '@/config'
import { errors } from '@/errors'
import { bus, BUS_EVENTS, localizeUnauthorizedError } from '@/helpers'
import i18n from '@/localization'
Expand Down Expand Up @@ -48,7 +49,9 @@ export class ErrorHandler {
break
case errors.ProviderInternalError:
if (error.message.toLowerCase().includes('timed out')) {
errorMessage = i18n.t('errors.slow-connection')
errorMessage = i18n.t('errors.slow-connection', {
supportLink: config.SUPPORT_LINK,
})
msgType = 'warning'
}
break
Expand Down
2 changes: 1 addition & 1 deletion src/localization/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"errors": {
"default": "Something went wrong",
"slow-connection": "ZK-circuit download failed. Possible slow internet connection. Please retry."
"slow-connection": "Operation timed out. Contact support at {{supportLink}}."
},
"notifications": {
"default-title-success": "Success",
Expand Down

0 comments on commit 7bf1f00

Please sign in to comment.