Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit e09e53e

Browse files
committed
fix(Error) enhance error handling MSIS-2931
1 parent 63bdb09 commit e09e53e

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

dist/iink.esm.js

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

dist/iink.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iink.min.js

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

dist/iink.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/configuration/Constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ const Constants = {
7272
Error: {
7373
NOT_REACHABLE: 'MyScript recognition server is not reachable. Please reload once you are connected.',
7474
WRONG_CREDENTIALS: 'Application credentials are invalid. Please check or regenerate your application key and hmackey.',
75-
TOO_OLD: 'Session is too old. Max Session Duration Reached.'
75+
TOO_OLD: 'Session is too old. Max Session Duration Reached.',
76+
NO_ACTIVITY: 'Session closed due to no activity.'
7677
},
7778
Exports: {
7879
JIIX: 'application/vnd.myscript.jiix'

src/recognizer/RecognizerService.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export function handleError (editor, err, ...events) {
130130
// IInk error managment after refactor
131131
(err.code && err.code === 'access.not.granted')) {
132132
editorRef.error.innerText = Constants.Error.WRONG_CREDENTIALS
133+
} else if (err.code && err.code === 'no.activity') {
134+
editorRef.error.innerText = Constants.Error.NO_ACTIVITY
133135
} else if (err.message === 'Session is too old. Max Session Duration Reached.' ||
134136
(err.code && err.code === 'session.too.old')) {
135137
editorRef.error.innerText = Constants.Error.TOO_OLD

0 commit comments

Comments
 (0)