Skip to content

Commit 46aed7c

Browse files
author
Stan van Rooy
authored
feat: show if error happens while querying (#29)
This makes it a lot easier to debug errors in queries. Previously users had to check the response of the query by using the browser developer tools. Now it shows the error in Grafana Panel UI.
1 parent ae95470 commit 46aed7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
7777
return this.arrayToDataFrame(response.data);
7878
}),
7979
catchError((err) => {
80-
return of({ data: [] });
80+
throw new Error(err.data.message);
8181
})
8282
)
8383
);

0 commit comments

Comments
 (0)