Error with SupabaseError Type in HttpApiGroup Configuration
hi I am trying to create an HttpApiGroup and set possible errors
Typesccript is complaining about the
export class ProductApiGroup extends HttpApiGroup.make("product")
.add(
HttpApiEndpoint.get("products", "/products").addSuccess(
// Schema.Array(Product), // TODO: cambiar
Schema.String,
),
)
.add(
HttpApiEndpoint.get("product", "/product/:id")
// .addSuccess(Schema.String)
.addSuccess(Product)
.addError(ErrorInvalidProduct)
.addError(SupabaseError)
.setPath(
Schema.Struct({
id: Schema.NonEmptyString,
}),
),
) {}export class ProductApiGroup extends HttpApiGroup.make("product")
.add(
HttpApiEndpoint.get("products", "/products").addSuccess(
// Schema.Array(Product), // TODO: cambiar
Schema.String,
),
)
.add(
HttpApiEndpoint.get("product", "/product/:id")
// .addSuccess(Schema.String)
.addSuccess(Product)
.addError(ErrorInvalidProduct)
.addError(SupabaseError)
.setPath(
Schema.Struct({
id: Schema.NonEmptyString,
}),
),
) {}Typesccript is complaining about the
SupabaseErrorSupabaseErrordeno-ts: Argument of type 'typeof SupabaseError' is not assignable to parameter of type 'Any'.
Type 'typeof SupabaseError' is missing the following properties from type 'Schema<any, any, unknown>': Type, Encoded, Context, ast, and 3 more. [2345]deno-ts: Argument of type 'typeof SupabaseError' is not assignable to parameter of type 'Any'.
Type 'typeof SupabaseError' is missing the following properties from type 'Schema<any, any, unknown>': Type, Encoded, Context, ast, and 3 more. [2345]