-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I am sure it is better to rethink about the condition that wraps call of resetError()
.
At the moment it has the condition bellow that looks like an error:
if (
error &&
'code' in error &&
[CHARTKIT_ERROR_CODE.NO_DATA, CHARTKIT_ERROR_CODE.INVALID_DATA].includes(
String(error.code),
)
) {
this.resetError();
}
There are several cases which definitely might be fixed by new data
:
export const CHARTKIT_ERROR_CODE = {
NO_DATA: 'ERR.CK.NO_DATA', // might be fixed by a new `data`
INVALID_DATA: 'ERR.CK.INVALID_DATA', // might be fixed by a new `data`
UNKNOWN: 'ERR.CK.UNKNOWN_ERROR', // might be fixed by a new `data`
UNKNOWN_PLUGIN: 'ERR.CK.UNKNOWN_PLUGIN', // the only case to freeze
TOO_MANY_LINES: 'ERR.CK.TOO_MANY_LINES', // might be fixed by a new `data`
};
Any chart absolutely should not freeze with TOO_MANY_LINES
, a user may touch some filter-controls to reduce size of data
. The same is actual to other cases except UNKNOWN_PLUGIN
.
Actually depending on client code even UNKNOWN_PLUGIN
might be fixed by new data
if for example chart-type is changed. The best approach is to call resetError for every new data
.
kuzmadom
Metadata
Metadata
Assignees
Labels
No labels