11/** @effect -diagnostics overriddenSchemaConstructor:skip-file */
2- import { TaggedError } from "effect-app/Schema"
2+ import { TaggedErrorClass } from "effect-app/Schema"
33import * as Cause from "effect/Cause"
44import * as S from "../Schema.js"
55
@@ -21,7 +21,7 @@ export const tryToJson = (error: { toJSON(): unknown; toString(): string }) => {
2121
2222// eslint-disable-next-line unused-imports/no-unused-vars
2323// @ts -expect-error type not used
24- export class NotFoundError < ItemType = string > extends TaggedError < NotFoundError < ItemType > > ( ) ( "NotFoundError" , {
24+ export class NotFoundError < ItemType = string > extends TaggedErrorClass < NotFoundError < ItemType > > ( ) ( "NotFoundError" , {
2525 type : S . String ,
2626 id : S . Unknown
2727} ) {
@@ -42,7 +42,7 @@ export class NotFoundError<ItemType = string> extends TaggedError<NotFoundError<
4242const messageFallback = ( messageOrObject ?: string | { message : string } ) =>
4343 typeof messageOrObject === "object" ? messageOrObject : { message : messageOrObject ?? "" }
4444
45- export class InvalidStateError extends TaggedError < InvalidStateError > ( ) ( "InvalidStateError" , {
45+ export class InvalidStateError extends TaggedErrorClass < InvalidStateError > ( ) ( "InvalidStateError" , {
4646 message : S . String
4747} ) {
4848 constructor ( messageOrObject : string | { message : string ; cause ?: unknown } , disableValidation ?: boolean ) {
@@ -56,7 +56,7 @@ export class InvalidStateError extends TaggedError<InvalidStateError>()("Invalid
5656 }
5757}
5858
59- export class ServiceUnavailableError extends TaggedError < ServiceUnavailableError > ( ) ( "ServiceUnavailableError" , {
59+ export class ServiceUnavailableError extends TaggedErrorClass < ServiceUnavailableError > ( ) ( "ServiceUnavailableError" , {
6060 message : S . String
6161} ) {
6262 constructor ( messageOrObject : string | { message : string ; cause ?: unknown } , disableValidation ?: boolean ) {
@@ -70,7 +70,7 @@ export class ServiceUnavailableError extends TaggedError<ServiceUnavailableError
7070 }
7171}
7272
73- export class ValidationError extends TaggedError < ValidationError > ( ) ( "ValidationError" , {
73+ export class ValidationError extends TaggedErrorClass < ValidationError > ( ) ( "ValidationError" , {
7474 errors : S . Array ( S . Unknown )
7575} ) {
7676 constructor (
@@ -87,7 +87,7 @@ export class ValidationError extends TaggedError<ValidationError>()("ValidationE
8787 }
8888}
8989
90- export class NotLoggedInError extends TaggedError < NotLoggedInError > ( ) ( "NotLoggedInError" , {
90+ export class NotLoggedInError extends TaggedErrorClass < NotLoggedInError > ( ) ( "NotLoggedInError" , {
9191 message : S . String
9292} ) {
9393 constructor ( messageOrObject ?: string | { message : string ; cause ?: unknown } , disableValidation ?: boolean ) {
@@ -101,7 +101,7 @@ export class NotLoggedInError extends TaggedError<NotLoggedInError>()("NotLogged
101101/**
102102 * The user carries a valid Userprofile, but there is a problem with the login none the less.
103103 */
104- export class LoginError extends TaggedError < LoginError > ( ) ( "NotLoggedInError" , {
104+ export class LoginError extends TaggedErrorClass < LoginError > ( ) ( "NotLoggedInError" , {
105105 message : S . String
106106} ) {
107107 constructor ( messageOrObject ?: string | { message : string ; cause ?: unknown } , disableValidation ?: boolean ) {
@@ -112,7 +112,7 @@ export class LoginError extends TaggedError<LoginError>()("NotLoggedInError", {
112112 }
113113}
114114
115- export class UnauthorizedError extends TaggedError < UnauthorizedError > ( ) ( "UnauthorizedError" , {
115+ export class UnauthorizedError extends TaggedErrorClass < UnauthorizedError > ( ) ( "UnauthorizedError" , {
116116 message : S . String
117117} ) {
118118 constructor ( messageOrObject ?: string | { message : string ; cause ?: unknown } , disableValidation ?: boolean ) {
@@ -131,7 +131,7 @@ type OptimisticConcurrencyDetails = {
131131 readonly found ?: string | undefined
132132}
133133
134- export class OptimisticConcurrencyException extends TaggedError < OptimisticConcurrencyException > ( ) (
134+ export class OptimisticConcurrencyException extends TaggedErrorClass < OptimisticConcurrencyException > ( ) (
135135 "OptimisticConcurrencyException" ,
136136 { message : S . String }
137137) {
0 commit comments