mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: show auth error when no token set
This commit is contained in:
parent
c9bc97aa4a
commit
1691e28a06
1 changed files with 6 additions and 1 deletions
|
|
@ -141,7 +141,12 @@ export const handleError: BoundMethodCreator<[Error]> = dispatch => async err =>
|
|||
) {
|
||||
dispatch.set({ errorDueToAuth: true })
|
||||
} else if (err.message === errors.CONNECTION_BLOCKED) {
|
||||
dispatch.call(setError, `Cannot connect to ${platformName}.`)
|
||||
const [, props] = dispatch.get()
|
||||
if (props.configContext.val.access_token) {
|
||||
dispatch.call(setError, `Cannot connect to ${platformName}.`)
|
||||
} else {
|
||||
dispatch.set({ errorDueToAuth: true })
|
||||
}
|
||||
} else if (err.message === errors.SERVER_FAULT) {
|
||||
dispatch.call(setError, `${platformName} server went down.`)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue