We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7314135 commit e2cc100Copy full SHA for e2cc100
src/DataSource.ts
@@ -130,7 +130,11 @@ export class DataSource extends DataSourceApi<MyQuery> {
130
if (result.data instanceof String) {
131
throw new Error(`${result.data}`);
132
} else if (result.data.result_code !== 0) {
133
- throw new Error(`${result.data.result}`);
+ let message = `${result.data}`;
134
+ if (result.data.result !== undefined) {
135
+ message = `${result.data.result}`;
136
+ }
137
+ throw new Error(message);
138
} else {
139
return result;
140
}
0 commit comments