fix(stats): update defect schemas
This commit is contained in:
parent
1b8bab3e35
commit
8396395f17
2 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ export type AthenaData = Record<string, string>
|
||||||
export class AthenaQueryError extends Schema.TaggedErrorClass<AthenaQueryError>()("AthenaQueryError", {
|
export class AthenaQueryError extends Schema.TaggedErrorClass<AthenaQueryError>()("AthenaQueryError", {
|
||||||
message: Schema.String,
|
message: Schema.String,
|
||||||
queryExecutionId: Schema.optional(Schema.String),
|
queryExecutionId: Schema.optional(Schema.String),
|
||||||
cause: Schema.optional(Schema.Defect),
|
cause: Schema.optional(Schema.Defect()),
|
||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
export class AthenaQueryTimeoutError extends Schema.TaggedErrorClass<AthenaQueryTimeoutError>()(
|
export class AthenaQueryTimeoutError extends Schema.TaggedErrorClass<AthenaQueryTimeoutError>()(
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,14 @@ export class DrizzleClient extends Context.Service<DrizzleClient, Drizzle>()("@o
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DatabaseError extends Schema.TaggedErrorClass<DatabaseError>()("DatabaseError", {
|
export class DatabaseError extends Schema.TaggedErrorClass<DatabaseError>()("DatabaseError", {
|
||||||
cause: Schema.Defect,
|
cause: Schema.Defect(),
|
||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
export const catchDbError = Effect.mapError((cause) => DatabaseError.make({ cause }))
|
export const catchDbError = Effect.mapError((cause) => DatabaseError.make({ cause }))
|
||||||
|
|
||||||
export class MigrationError extends Schema.TaggedErrorClass<MigrationError>()("MigrationError", {
|
export class MigrationError extends Schema.TaggedErrorClass<MigrationError>()("MigrationError", {
|
||||||
message: Schema.String,
|
message: Schema.String,
|
||||||
cause: Schema.optional(Schema.Defect),
|
cause: Schema.optional(Schema.Defect()),
|
||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
export const migrate = Effect.fn("Database.migrate")(function* () {
|
export const migrate = Effect.fn("Database.migrate")(function* () {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue