Browse Source

subclass Error for queries

Jason Gorst 1 tháng trước cách đây
mục cha
commit
28151ceda9
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      app/utils/QueryError.js

+ 7 - 0
app/utils/QueryError.js

@@ -0,0 +1,7 @@
+export default class QueryError extends Error {
+  constructor(message, options) {
+    super(message, options)
+    this.name = "QueryError"
+    this.key = options?.key
+  }
+}