@zudojs/errors 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/core/baseError.core.d.ts +6 -1
- package/dist/base/core/baseError.core.js +6 -1
- package/dist/base/core/baseError.serialize.d.ts +0 -1
- package/dist/base/core/baseError.serialize.js +0 -1
- package/dist/base/core/errorCause.redact.d.ts +0 -1
- package/dist/base/core/errorCause.redact.js +0 -1
- package/dist/base/core/errorMetadata.core.d.ts +0 -1
- package/dist/base/core/errorMetadata.core.js +0 -1
- package/dist/base/core/errorMetadata.type.d.ts +0 -1
- package/dist/base/core/errorMetadata.type.js +0 -1
- package/dist/base/core/index.d.ts +0 -1
- package/dist/base/core/index.js +0 -1
- package/dist/base/index.d.ts +0 -1
- package/dist/base/index.js +0 -1
- package/dist/base/types/baseError.type.d.ts +6 -1
- package/dist/base/types/baseError.type.js +0 -1
- package/dist/base/types/errorCategory.enum.d.ts +0 -1
- package/dist/base/types/errorCategory.enum.js +0 -1
- package/dist/base/types/errorCategory.helpers.d.ts +0 -1
- package/dist/base/types/errorCategory.helpers.js +0 -1
- package/dist/base/types/errorCategory.type.d.ts +0 -1
- package/dist/base/types/errorCategory.type.js +0 -1
- package/dist/base/types/errorCode.type.d.ts +0 -1
- package/dist/base/types/errorCode.type.js +0 -1
- package/dist/base/types/errorSeverity.type.d.ts +0 -1
- package/dist/base/types/errorSeverity.type.js +0 -1
- package/dist/base/types/index.d.ts +0 -1
- package/dist/base/types/index.js +0 -1
- package/dist/base/utils/baseError.utils.d.ts +0 -1
- package/dist/base/utils/baseError.utils.js +0 -1
- package/dist/base/utils/index.d.ts +0 -1
- package/dist/base/utils/index.js +0 -1
- package/dist/domain/access/authError.base.d.ts +0 -1
- package/dist/domain/access/authError.base.js +0 -1
- package/dist/domain/access/authentication.error.d.ts +0 -1
- package/dist/domain/access/authentication.error.js +0 -1
- package/dist/domain/access/authorization.error.d.ts +0 -1
- package/dist/domain/access/authorization.error.js +0 -1
- package/dist/domain/access/index.d.ts +0 -1
- package/dist/domain/access/index.js +0 -1
- package/dist/domain/access/oauthError.base.d.ts +0 -1
- package/dist/domain/access/oauthError.base.js +0 -1
- package/dist/domain/access/rateLimit.error.d.ts +0 -1
- package/dist/domain/access/rateLimit.error.js +0 -1
- package/dist/domain/api/api.error.d.ts +0 -1
- package/dist/domain/api/api.error.js +0 -1
- package/dist/domain/api/apiError.base.d.ts +0 -1
- package/dist/domain/api/apiError.base.js +0 -1
- package/dist/domain/api/apiError.lifecycle.d.ts +0 -1
- package/dist/domain/api/apiError.lifecycle.js +0 -1
- package/dist/domain/api/apiError.routing.d.ts +0 -1
- package/dist/domain/api/apiError.routing.js +0 -1
- package/dist/domain/api/index.d.ts +0 -1
- package/dist/domain/api/index.js +0 -1
- package/dist/domain/app/application.error.d.ts +0 -1
- package/dist/domain/app/application.error.js +0 -1
- package/dist/domain/app/configuration.error.d.ts +0 -1
- package/dist/domain/app/configuration.error.js +0 -1
- package/dist/domain/app/domain.error.d.ts +0 -1
- package/dist/domain/app/domain.error.js +0 -1
- package/dist/domain/app/index.d.ts +0 -1
- package/dist/domain/app/index.js +0 -1
- package/dist/domain/app/lifecycle.error.d.ts +0 -1
- package/dist/domain/app/lifecycle.error.js +0 -1
- package/dist/domain/app/lifecycleError.base.d.ts +0 -1
- package/dist/domain/app/lifecycleError.base.js +0 -1
- package/dist/domain/app/lifecycleError.types.d.ts +0 -1
- package/dist/domain/app/lifecycleError.types.js +0 -1
- package/dist/domain/app/module.error.d.ts +0 -1
- package/dist/domain/app/module.error.js +0 -1
- package/dist/domain/app/moduleError.base.d.ts +0 -1
- package/dist/domain/app/moduleError.base.js +0 -1
- package/dist/domain/app/moduleError.types.d.ts +0 -1
- package/dist/domain/app/moduleError.types.js +0 -1
- package/dist/domain/body/bodyParser.error.d.ts +0 -1
- package/dist/domain/body/bodyParser.error.js +0 -1
- package/dist/domain/body/httpBody.error.d.ts +0 -1
- package/dist/domain/body/httpBody.error.js +0 -1
- package/dist/domain/body/httpBodyError.base.d.ts +0 -1
- package/dist/domain/body/httpBodyError.base.js +0 -1
- package/dist/domain/body/httpBodyError.types.d.ts +0 -1
- package/dist/domain/body/httpBodyError.types.js +0 -1
- package/dist/domain/body/httpFormData.error.d.ts +0 -1
- package/dist/domain/body/httpFormData.error.js +0 -1
- package/dist/domain/body/index.d.ts +0 -1
- package/dist/domain/body/index.js +0 -1
- package/dist/domain/body/multipart.error.d.ts +0 -1
- package/dist/domain/body/multipart.error.js +0 -1
- package/dist/domain/cli/cliError.base.d.ts +0 -1
- package/dist/domain/cli/cliError.base.js +0 -1
- package/dist/domain/cli/index.d.ts +0 -1
- package/dist/domain/cli/index.js +0 -1
- package/dist/domain/constant/constantError.base.d.ts +0 -1
- package/dist/domain/constant/constantError.base.js +0 -1
- package/dist/domain/constant/index.d.ts +0 -1
- package/dist/domain/constant/index.js +0 -1
- package/dist/domain/cqrs/cqrsError.base.d.ts +0 -1
- package/dist/domain/cqrs/cqrsError.base.js +0 -1
- package/dist/domain/cqrs/cqrsError.result.d.ts +0 -1
- package/dist/domain/cqrs/cqrsError.result.js +0 -1
- package/dist/domain/cqrs/index.d.ts +0 -1
- package/dist/domain/cqrs/index.js +0 -1
- package/dist/domain/documentation/documentation.error.d.ts +0 -1
- package/dist/domain/documentation/documentation.error.js +0 -1
- package/dist/domain/documentation/documentationError.base.d.ts +0 -1
- package/dist/domain/documentation/documentationError.base.js +0 -1
- package/dist/domain/documentation/documentationError.types.d.ts +0 -1
- package/dist/domain/documentation/documentationError.types.js +0 -1
- package/dist/domain/documentation/index.d.ts +0 -1
- package/dist/domain/documentation/index.js +0 -1
- package/dist/domain/event/event.error.d.ts +0 -1
- package/dist/domain/event/event.error.js +0 -1
- package/dist/domain/event/eventError.base.d.ts +0 -1
- package/dist/domain/event/eventError.base.js +0 -1
- package/dist/domain/event/eventError.handler.d.ts +0 -1
- package/dist/domain/event/eventError.handler.js +0 -1
- package/dist/domain/event/eventError.lifecycle.d.ts +0 -1
- package/dist/domain/event/eventError.lifecycle.js +0 -1
- package/dist/domain/event/eventError.serialization.d.ts +0 -1
- package/dist/domain/event/eventError.serialization.js +0 -1
- package/dist/domain/event/index.d.ts +0 -1
- package/dist/domain/event/index.js +0 -1
- package/dist/domain/index.d.ts +0 -1
- package/dist/domain/index.js +0 -1
- package/dist/domain/message/index.d.ts +0 -1
- package/dist/domain/message/index.js +0 -1
- package/dist/domain/message/message.error.d.ts +0 -1
- package/dist/domain/message/message.error.js +0 -1
- package/dist/domain/message/messageError.base.d.ts +0 -1
- package/dist/domain/message/messageError.base.js +0 -1
- package/dist/domain/message/messageError.handler.d.ts +0 -1
- package/dist/domain/message/messageError.handler.js +0 -1
- package/dist/domain/message/messageError.lifecycle.d.ts +0 -1
- package/dist/domain/message/messageError.lifecycle.js +0 -1
- package/dist/domain/message/messageError.serialization.d.ts +0 -1
- package/dist/domain/message/messageError.serialization.js +0 -1
- package/dist/domain/message/messageError.validation.d.ts +0 -1
- package/dist/domain/message/messageError.validation.js +0 -1
- package/dist/domain/openapi/index.d.ts +0 -1
- package/dist/domain/openapi/index.js +0 -1
- package/dist/domain/openapi/openApiError.base.d.ts +0 -1
- package/dist/domain/openapi/openApiError.base.js +0 -1
- package/dist/domain/plugin/index.d.ts +0 -1
- package/dist/domain/plugin/index.js +0 -1
- package/dist/domain/plugin/plugin.error.d.ts +0 -1
- package/dist/domain/plugin/plugin.error.js +0 -1
- package/dist/domain/plugin/pluginError.base.d.ts +0 -1
- package/dist/domain/plugin/pluginError.base.js +0 -1
- package/dist/domain/plugin/pluginError.lifecycle.d.ts +0 -1
- package/dist/domain/plugin/pluginError.lifecycle.js +0 -1
- package/dist/domain/plugin/pluginError.runtime.d.ts +0 -1
- package/dist/domain/plugin/pluginError.runtime.js +0 -1
- package/dist/domain/queue/index.d.ts +0 -1
- package/dist/domain/queue/index.js +0 -1
- package/dist/domain/queue/queue.error.d.ts +0 -1
- package/dist/domain/queue/queue.error.js +0 -1
- package/dist/domain/queue/queueError.base.d.ts +0 -1
- package/dist/domain/queue/queueError.base.js +0 -1
- package/dist/domain/queue/queueError.job.d.ts +0 -1
- package/dist/domain/queue/queueError.job.js +0 -1
- package/dist/domain/queue/queueError.queue.d.ts +0 -1
- package/dist/domain/queue/queueError.queue.js +0 -1
- package/dist/domain/queue/queueError.worker.d.ts +0 -1
- package/dist/domain/queue/queueError.worker.js +0 -1
- package/dist/domain/rpc/index.d.ts +0 -1
- package/dist/domain/rpc/index.js +0 -1
- package/dist/domain/rpc/rpc.error.d.ts +0 -1
- package/dist/domain/rpc/rpc.error.js +0 -1
- package/dist/domain/rpc/rpcError.base.d.ts +0 -1
- package/dist/domain/rpc/rpcError.base.js +0 -1
- package/dist/domain/rpc/rpcError.protocol.d.ts +0 -1
- package/dist/domain/rpc/rpcError.protocol.js +0 -1
- package/dist/domain/rpc/rpcError.transport.d.ts +0 -1
- package/dist/domain/rpc/rpcError.transport.js +0 -1
- package/dist/domain/scheduler/index.d.ts +0 -1
- package/dist/domain/scheduler/index.js +0 -1
- package/dist/domain/scheduler/scheduler.error.d.ts +0 -1
- package/dist/domain/scheduler/scheduler.error.js +0 -1
- package/dist/domain/scheduler/schedulerError.base.d.ts +0 -1
- package/dist/domain/scheduler/schedulerError.base.js +0 -1
- package/dist/domain/scheduler/schedulerError.execution.d.ts +0 -1
- package/dist/domain/scheduler/schedulerError.execution.js +0 -1
- package/dist/domain/scheduler/schedulerError.schedule.d.ts +0 -1
- package/dist/domain/scheduler/schedulerError.schedule.js +0 -1
- package/dist/domain/schema/index.d.ts +0 -1
- package/dist/domain/schema/index.js +0 -1
- package/dist/domain/schema/schema.error.d.ts +0 -1
- package/dist/domain/schema/schema.error.js +0 -1
- package/dist/domain/schema/schemaError.base.d.ts +0 -1
- package/dist/domain/schema/schemaError.base.js +0 -1
- package/dist/domain/schema/schemaError.types.d.ts +0 -1
- package/dist/domain/schema/schemaError.types.js +0 -1
- package/dist/domain/serialization/index.d.ts +0 -1
- package/dist/domain/serialization/index.js +0 -1
- package/dist/domain/serialization/serialization.error.d.ts +0 -1
- package/dist/domain/serialization/serialization.error.js +0 -1
- package/dist/domain/serialization/serializationError.base.d.ts +0 -1
- package/dist/domain/serialization/serializationError.base.js +0 -1
- package/dist/domain/serialization/serializationError.limits.d.ts +0 -1
- package/dist/domain/serialization/serializationError.limits.js +0 -1
- package/dist/domain/serialization/serializationError.types.d.ts +0 -1
- package/dist/domain/serialization/serializationError.types.js +0 -1
- package/dist/domain/shared/domainError.helpers.d.ts +0 -1
- package/dist/domain/shared/domainError.helpers.js +0 -1
- package/dist/domain/state/conflict.error.d.ts +0 -1
- package/dist/domain/state/conflict.error.js +0 -1
- package/dist/domain/state/index.d.ts +0 -1
- package/dist/domain/state/index.js +0 -1
- package/dist/domain/state/notFound.error.d.ts +0 -1
- package/dist/domain/state/notFound.error.js +0 -1
- package/dist/domain/state/validation.error.d.ts +0 -1
- package/dist/domain/state/validation.error.js +0 -1
- package/dist/domain/state/validationError.base.d.ts +0 -1
- package/dist/domain/state/validationError.base.js +0 -1
- package/dist/domain/state/validationError.helpers.d.ts +0 -1
- package/dist/domain/state/validationError.helpers.js +0 -1
- package/dist/domain/transaction/index.d.ts +0 -1
- package/dist/domain/transaction/index.js +0 -1
- package/dist/domain/transaction/transactionError.base.d.ts +0 -1
- package/dist/domain/transaction/transactionError.base.js +0 -1
- package/dist/domain/transaction/transactionError.misc.d.ts +0 -1
- package/dist/domain/transaction/transactionError.misc.js +0 -1
- package/dist/domain/transaction/transactionError.types.d.ts +0 -1
- package/dist/domain/transaction/transactionError.types.js +0 -1
- package/dist/domain/traversal/index.d.ts +0 -1
- package/dist/domain/traversal/index.js +0 -1
- package/dist/domain/traversal/traversalLimit.error.d.ts +0 -1
- package/dist/domain/traversal/traversalLimit.error.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/infrastructure/adapter/adapter.error.d.ts +0 -1
- package/dist/infrastructure/adapter/adapter.error.js +0 -1
- package/dist/infrastructure/adapter/adapterError.base.d.ts +0 -1
- package/dist/infrastructure/adapter/adapterError.base.js +0 -1
- package/dist/infrastructure/adapter/adapterError.lifecycle.d.ts +0 -1
- package/dist/infrastructure/adapter/adapterError.lifecycle.js +0 -1
- package/dist/infrastructure/adapter/adapterError.operation.d.ts +0 -1
- package/dist/infrastructure/adapter/adapterError.operation.js +2 -3
- package/dist/infrastructure/adapter/index.d.ts +0 -1
- package/dist/infrastructure/adapter/index.js +0 -1
- package/dist/infrastructure/cache/cache.error.d.ts +0 -1
- package/dist/infrastructure/cache/cache.error.js +0 -1
- package/dist/infrastructure/cache/cacheError.base.d.ts +0 -1
- package/dist/infrastructure/cache/cacheError.base.js +0 -1
- package/dist/infrastructure/cache/cacheError.factory.d.ts +0 -1
- package/dist/infrastructure/cache/cacheError.factory.js +0 -1
- package/dist/infrastructure/cache/index.d.ts +0 -1
- package/dist/infrastructure/cache/index.js +0 -1
- package/dist/infrastructure/container/container.error.d.ts +0 -1
- package/dist/infrastructure/container/container.error.js +0 -1
- package/dist/infrastructure/container/containerError.base.d.ts +0 -1
- package/dist/infrastructure/container/containerError.base.js +0 -1
- package/dist/infrastructure/container/containerError.registration.d.ts +0 -1
- package/dist/infrastructure/container/containerError.registration.js +0 -1
- package/dist/infrastructure/container/index.d.ts +0 -1
- package/dist/infrastructure/container/index.js +0 -1
- package/dist/infrastructure/httpPipeline/httpMiddleware.error.d.ts +0 -1
- package/dist/infrastructure/httpPipeline/httpMiddleware.error.js +0 -1
- package/dist/infrastructure/httpPipeline/httpRequestGuard.error.d.ts +0 -1
- package/dist/infrastructure/httpPipeline/httpRequestGuard.error.js +0 -1
- package/dist/infrastructure/httpPipeline/index.d.ts +0 -1
- package/dist/infrastructure/httpPipeline/index.js +0 -1
- package/dist/infrastructure/index.d.ts +0 -1
- package/dist/infrastructure/index.js +0 -1
- package/dist/infrastructure/middleware/index.d.ts +0 -1
- package/dist/infrastructure/middleware/index.js +0 -1
- package/dist/infrastructure/middleware/middleware.error.d.ts +0 -1
- package/dist/infrastructure/middleware/middleware.error.js +3 -1
- package/dist/infrastructure/middleware/middlewareError.types.d.ts +8 -3
- package/dist/infrastructure/middleware/middlewareError.types.js +27 -4
- package/dist/infrastructure/network/http.error.d.ts +0 -1
- package/dist/infrastructure/network/http.error.js +0 -1
- package/dist/infrastructure/network/httpAdapter.error.d.ts +0 -1
- package/dist/infrastructure/network/httpAdapter.error.js +0 -1
- package/dist/infrastructure/network/httpClient.errors.d.ts +0 -1
- package/dist/infrastructure/network/httpClient.errors.js +0 -1
- package/dist/infrastructure/network/httpClientError.advanced.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.advanced.js +0 -1
- package/dist/infrastructure/network/httpClientError.base.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.base.js +0 -1
- package/dist/infrastructure/network/httpClientError.common.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.common.js +0 -1
- package/dist/infrastructure/network/httpClientError.error.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.error.js +0 -1
- package/dist/infrastructure/network/httpClientError.options.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.options.js +0 -1
- package/dist/infrastructure/network/httpClientError.specialized.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.specialized.js +0 -1
- package/dist/infrastructure/network/httpClientError.types.d.ts +0 -1
- package/dist/infrastructure/network/httpClientError.types.js +0 -1
- package/dist/infrastructure/network/httpError.base.d.ts +0 -1
- package/dist/infrastructure/network/httpError.base.js +0 -1
- package/dist/infrastructure/network/httpError.helpers.d.ts +0 -1
- package/dist/infrastructure/network/httpError.helpers.js +0 -1
- package/dist/infrastructure/network/httpResponse.error.d.ts +0 -1
- package/dist/infrastructure/network/httpResponse.error.js +0 -1
- package/dist/infrastructure/network/httpRouter.error.d.ts +0 -1
- package/dist/infrastructure/network/httpRouter.error.js +0 -1
- package/dist/infrastructure/network/httpRouterError.base.d.ts +0 -1
- package/dist/infrastructure/network/httpRouterError.base.js +0 -1
- package/dist/infrastructure/network/httpRouterError.types.d.ts +22 -2
- package/dist/infrastructure/network/httpRouterError.types.js +24 -4
- package/dist/infrastructure/network/httpServerError.error.d.ts +7 -1
- package/dist/infrastructure/network/httpServerError.error.js +8 -2
- package/dist/infrastructure/network/httpServerLifecycle.error.d.ts +0 -1
- package/dist/infrastructure/network/httpServerLifecycle.error.js +0 -1
- package/dist/infrastructure/network/httpServerLifecycleError.base.d.ts +0 -1
- package/dist/infrastructure/network/httpServerLifecycleError.base.js +0 -1
- package/dist/infrastructure/network/httpServerLifecycleError.types.d.ts +0 -1
- package/dist/infrastructure/network/httpServerLifecycleError.types.js +0 -1
- package/dist/infrastructure/network/httpStream.error.d.ts +0 -1
- package/dist/infrastructure/network/httpStream.error.js +0 -1
- package/dist/infrastructure/network/index.d.ts +0 -1
- package/dist/infrastructure/network/index.js +0 -1
- package/dist/infrastructure/network/network.error.d.ts +0 -1
- package/dist/infrastructure/network/network.error.js +0 -1
- package/dist/infrastructure/network/networkError.base.d.ts +0 -1
- package/dist/infrastructure/network/networkError.base.js +0 -1
- package/dist/infrastructure/network/networkError.factory.d.ts +0 -1
- package/dist/infrastructure/network/networkError.factory.js +0 -1
- package/dist/infrastructure/network/routePattern.error.d.ts +0 -1
- package/dist/infrastructure/network/routePattern.error.js +0 -1
- package/dist/infrastructure/network/timeout.error.d.ts +0 -1
- package/dist/infrastructure/network/timeout.error.js +0 -1
- package/dist/infrastructure/network/timeoutError.base.d.ts +0 -1
- package/dist/infrastructure/network/timeoutError.base.js +0 -1
- package/dist/infrastructure/network/timeoutError.factory.d.ts +0 -1
- package/dist/infrastructure/network/timeoutError.factory.js +0 -1
- package/dist/infrastructure/service/externalService.error.d.ts +0 -1
- package/dist/infrastructure/service/externalService.error.js +0 -1
- package/dist/infrastructure/service/externalServiceError.base.d.ts +9 -3
- package/dist/infrastructure/service/externalServiceError.base.js +20 -3
- package/dist/infrastructure/service/externalServiceError.factory.d.ts +0 -1
- package/dist/infrastructure/service/externalServiceError.factory.js +0 -1
- package/dist/infrastructure/service/index.d.ts +0 -1
- package/dist/infrastructure/service/index.js +0 -1
- package/dist/infrastructure/service/service.error.d.ts +0 -1
- package/dist/infrastructure/service/service.error.js +0 -1
- package/dist/infrastructure/service/serviceError.base.d.ts +0 -1
- package/dist/infrastructure/service/serviceError.base.js +0 -1
- package/dist/infrastructure/service/serviceError.factory.d.ts +0 -1
- package/dist/infrastructure/service/serviceError.factory.js +0 -1
- package/dist/infrastructure/storage/database.error.d.ts +0 -1
- package/dist/infrastructure/storage/database.error.js +0 -1
- package/dist/infrastructure/storage/databaseError.base.d.ts +0 -1
- package/dist/infrastructure/storage/databaseError.base.js +0 -1
- package/dist/infrastructure/storage/databaseError.factory.d.ts +0 -1
- package/dist/infrastructure/storage/databaseError.factory.js +0 -1
- package/dist/infrastructure/storage/index.d.ts +0 -1
- package/dist/infrastructure/storage/index.js +0 -1
- package/dist/infrastructure/storage/storage.error.d.ts +0 -1
- package/dist/infrastructure/storage/storage.error.js +0 -1
- package/dist/infrastructure/storage/storageError.base.d.ts +0 -1
- package/dist/infrastructure/storage/storageError.base.js +0 -1
- package/dist/infrastructure/storage/storageError.factory.d.ts +0 -1
- package/dist/infrastructure/storage/storageError.factory.js +0 -1
- package/dist/system/crypto.error.d.ts +0 -1
- package/dist/system/crypto.error.js +0 -1
- package/dist/system/cryptoError.base.d.ts +0 -1
- package/dist/system/cryptoError.base.js +0 -1
- package/dist/system/cryptoError.factory.d.ts +0 -1
- package/dist/system/cryptoError.factory.js +0 -1
- package/dist/system/index.d.ts +0 -1
- package/dist/system/index.js +0 -1
- package/dist/system/logging/index.d.ts +0 -1
- package/dist/system/logging/index.js +0 -1
- package/dist/system/logging/logging.error.d.ts +0 -1
- package/dist/system/logging/logging.error.js +0 -1
- package/dist/system/observability/index.d.ts +0 -1
- package/dist/system/observability/index.js +0 -1
- package/dist/system/observability/observabilityError.base.d.ts +0 -1
- package/dist/system/observability/observabilityError.base.js +0 -1
- package/dist/system/runtime.error.d.ts +0 -1
- package/dist/system/runtime.error.js +0 -1
- package/dist/system/runtimeError.base.d.ts +0 -1
- package/dist/system/runtimeError.base.js +0 -1
- package/dist/system/runtimeError.types.d.ts +0 -1
- package/dist/system/runtimeError.types.js +0 -1
- package/dist/system/system.error.d.ts +0 -1
- package/dist/system/system.error.js +0 -1
- package/dist/system/systemError.base.d.ts +0 -1
- package/dist/system/systemError.base.js +0 -1
- package/dist/system/systemError.factory.d.ts +0 -1
- package/dist/system/systemError.factory.js +0 -1
- package/dist/utils/errorHandler.core.d.ts +1 -1
- package/dist/utils/errorHandler.core.js +12 -12
- package/dist/utils/errorHandler.factory.d.ts +0 -1
- package/dist/utils/errorHandler.factory.js +0 -1
- package/dist/utils/errorHandler.types.d.ts +11 -4
- package/dist/utils/errorHandler.types.js +0 -1
- package/dist/utils/errorMapper.core.d.ts +0 -1
- package/dist/utils/errorMapper.core.js +0 -1
- package/dist/utils/errorMapper.mappers.d.ts +0 -1
- package/dist/utils/errorMapper.mappers.js +0 -1
- package/dist/utils/errorMapper.registry.d.ts +0 -1
- package/dist/utils/errorMapper.registry.js +0 -1
- package/dist/utils/errorMapper.types.d.ts +0 -1
- package/dist/utils/errorMapper.types.js +0 -1
- package/dist/utils/errorSerializer.core.d.ts +6 -4
- package/dist/utils/errorSerializer.core.js +17 -19
- package/dist/utils/errorSerializer.factory.d.ts +0 -1
- package/dist/utils/errorSerializer.factory.js +0 -1
- package/dist/utils/errorSerializer.public.d.ts +41 -0
- package/dist/utils/errorSerializer.public.js +54 -0
- package/dist/utils/errorSerializer.types.d.ts +19 -3
- package/dist/utils/errorSerializer.types.js +0 -1
- package/dist/utils/errorUtils.extraction.d.ts +0 -1
- package/dist/utils/errorUtils.extraction.js +0 -1
- package/dist/utils/errorUtils.helper.d.ts +0 -1
- package/dist/utils/errorUtils.helper.js +0 -1
- package/dist/utils/errorUtils.transform.d.ts +0 -1
- package/dist/utils/errorUtils.transform.js +0 -1
- package/dist/utils/errorUtils.typeCheck.d.ts +0 -1
- package/dist/utils/errorUtils.typeCheck.js +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/package.json +1 -1
|
@@ -5,13 +5,23 @@ import { BaseError } from "../../base/core/baseError.core.js";
|
|
|
5
5
|
import { ErrorCategory } from "../../base/types/errorCategory.type.js";
|
|
6
6
|
import { ErrorCode } from "../../base/types/errorCode.type.js";
|
|
7
7
|
import { ErrorSeverity } from "../../base/types/errorSeverity.type.js";
|
|
8
|
-
/**
|
|
8
|
+
/** Service name recorded when a caller supplies none. */
|
|
9
|
+
const UNKNOWN_SERVICE = "unknown";
|
|
10
|
+
/**
|
|
11
|
+
* Error raised when an external dependency fails.
|
|
12
|
+
*
|
|
13
|
+
* `options.service` is required by the type. A JavaScript caller (or a
|
|
14
|
+
* `catch` block re-throwing with only a message) that omits the options
|
|
15
|
+
* object gets `service: "unknown"` rather than a `TypeError` thrown from
|
|
16
|
+
* inside the error constructor, which hid the failure it was reporting.
|
|
17
|
+
*/
|
|
9
18
|
export class ExternalServiceError extends BaseError {
|
|
10
19
|
service;
|
|
11
20
|
operation;
|
|
12
21
|
responseStatus;
|
|
13
22
|
serviceCode;
|
|
14
|
-
constructor(message = "An external service operation failed.", options) {
|
|
23
|
+
constructor(message = "An external service operation failed.", options = { service: UNKNOWN_SERVICE }) {
|
|
24
|
+
options = withService(options);
|
|
15
25
|
super(message, {
|
|
16
26
|
...options,
|
|
17
27
|
code: options.code ?? ErrorCode.EXTERNAL_SERVICE,
|
|
@@ -53,6 +63,14 @@ export class ExternalServiceError extends BaseError {
|
|
|
53
63
|
};
|
|
54
64
|
}
|
|
55
65
|
}
|
|
66
|
+
/** Fills in the service name when the caller left the options incomplete. */
|
|
67
|
+
function withService(options) {
|
|
68
|
+
const partial = (options ?? {});
|
|
69
|
+
const service = typeof partial.service === "string" && partial.service.length > 0
|
|
70
|
+
? partial.service
|
|
71
|
+
: UNKNOWN_SERVICE;
|
|
72
|
+
return { ...partial, service };
|
|
73
|
+
}
|
|
56
74
|
/** Creates an external service error. */
|
|
57
75
|
export function createExternalServiceError(service, message = "An external service operation failed.", options = {}) {
|
|
58
76
|
return new ExternalServiceError(message, { ...options, service });
|
|
@@ -74,4 +92,3 @@ export function mapResponseStatus(responseStatus) {
|
|
|
74
92
|
}
|
|
75
93
|
return 502;
|
|
76
94
|
}
|
|
77
|
-
//# sourceMappingURL=externalServiceError.base.js.map
|
|
@@ -8,4 +8,3 @@ export declare function externalServiceTimeoutError(service: string, operation?:
|
|
|
8
8
|
export declare function externalServiceUnavailableError(service: string, operation?: string): ExternalServiceError;
|
|
9
9
|
/** @deprecated Use `externalServiceUnavailableError`. */
|
|
10
10
|
export declare const externalServiceUnavailable: typeof externalServiceUnavailableError;
|
|
11
|
-
//# sourceMappingURL=externalServiceError.factory.d.ts.map
|
|
@@ -31,4 +31,3 @@ export function externalServiceUnavailableError(service, operation) {
|
|
|
31
31
|
}
|
|
32
32
|
/** @deprecated Use `externalServiceUnavailableError`. */
|
|
33
33
|
export const externalServiceUnavailable = externalServiceUnavailableError;
|
|
34
|
-
//# sourceMappingURL=externalServiceError.factory.js.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { ServiceError, createServiceError, isServiceError, } from "./serviceError.base.js";
|
|
5
5
|
export type { ServiceErrorOptions } from "./serviceError.base.js";
|
|
6
6
|
export { serviceUnavailableError, serviceInitializationError, serviceOperationError, } from "./serviceError.factory.js";
|
|
7
|
-
//# sourceMappingURL=service.error.d.ts.map
|
|
@@ -36,4 +36,3 @@ export declare class ServiceError extends BaseError {
|
|
|
36
36
|
export declare function createServiceError(message?: string, options?: ServiceErrorOptions): ServiceError;
|
|
37
37
|
/** Determines whether an unknown value is a ServiceError. */
|
|
38
38
|
export declare function isServiceError(value: unknown): value is ServiceError;
|
|
39
|
-
//# sourceMappingURL=serviceError.base.d.ts.map
|
|
@@ -8,4 +8,3 @@ export declare function serviceUnavailableError(service?: string): ServiceError;
|
|
|
8
8
|
export declare function serviceInitializationError(service?: string, cause?: unknown): ServiceError;
|
|
9
9
|
/** Creates a service operation failure. */
|
|
10
10
|
export declare function serviceOperationError(operation: string, service?: string): ServiceError;
|
|
11
|
-
//# sourceMappingURL=serviceError.factory.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { DatabaseError, createDatabaseError, isDatabaseError, DatabaseOperation, } from "./databaseError.base.js";
|
|
5
5
|
export type { DatabaseErrorOptions } from "./databaseError.base.js";
|
|
6
6
|
export { databaseConnectionError, databaseQueryError, databaseTransactionError, databaseMigrationError, } from "./databaseError.factory.js";
|
|
7
|
-
//# sourceMappingURL=database.error.d.ts.map
|
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { DatabaseError, createDatabaseError, isDatabaseError, DatabaseOperation, } from "./databaseError.base.js";
|
|
5
5
|
export { databaseConnectionError, databaseQueryError, databaseTransactionError, databaseMigrationError, } from "./databaseError.factory.js";
|
|
6
|
-
//# sourceMappingURL=database.error.js.map
|
|
@@ -51,4 +51,3 @@ export declare class DatabaseError extends BaseError {
|
|
|
51
51
|
export declare function createDatabaseError(message?: string, options?: DatabaseErrorOptions): DatabaseError;
|
|
52
52
|
/** Determines whether an unknown value is a DatabaseError. */
|
|
53
53
|
export declare function isDatabaseError(value: unknown): value is DatabaseError;
|
|
54
|
-
//# sourceMappingURL=databaseError.base.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare function databaseQueryError(message?: string, options?: Omit<Data
|
|
|
10
10
|
export declare function databaseTransactionError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
11
11
|
/** Creates a database migration error. */
|
|
12
12
|
export declare function databaseMigrationError(message?: string, options?: Omit<DatabaseErrorOptions, "operation">): DatabaseError;
|
|
13
|
-
//# sourceMappingURL=databaseError.factory.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
|
|
5
5
|
export type { StorageErrorOptions } from "./storageError.base.js";
|
|
6
6
|
export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
|
|
7
|
-
//# sourceMappingURL=storage.error.d.ts.map
|
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { StorageError, createStorageError, isStorageError, StorageOperation, } from "./storageError.base.js";
|
|
5
5
|
export { storageReadError, storageWriteError, storageUploadError, storageDownloadError, storageDeleteError, storageNotFoundError, } from "./storageError.factory.js";
|
|
6
|
-
//# sourceMappingURL=storage.error.js.map
|
|
@@ -52,4 +52,3 @@ export declare class StorageError extends BaseError {
|
|
|
52
52
|
export declare function createStorageError(message?: string, options?: StorageErrorOptions): StorageError;
|
|
53
53
|
/** Determines whether an unknown value is a StorageError. */
|
|
54
54
|
export declare function isStorageError(value: unknown): value is StorageError;
|
|
55
|
-
//# sourceMappingURL=storageError.base.d.ts.map
|
|
@@ -14,4 +14,3 @@ export declare function storageDownloadError(resource: string, provider?: string
|
|
|
14
14
|
export declare function storageDeleteError(resource: string, provider?: string, cause?: unknown): StorageError;
|
|
15
15
|
/** Creates a storage not found error. */
|
|
16
16
|
export declare function storageNotFoundError(resource: string, provider?: string): StorageError;
|
|
17
|
-
//# sourceMappingURL=storageError.factory.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
|
|
5
5
|
export type { CryptoErrorOptions } from "./cryptoError.base.js";
|
|
6
6
|
export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
|
|
7
|
-
//# sourceMappingURL=crypto.error.d.ts.map
|
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { CryptoError, createCryptoError, isCryptoError, CryptoOperation, } from "./cryptoError.base.js";
|
|
5
5
|
export { cryptoHashError, cryptoCipherError, cryptoSignatureError, cryptoKeyDerivationError, cryptoKeyError, } from "./cryptoError.factory.js";
|
|
6
|
-
//# sourceMappingURL=crypto.error.js.map
|
|
@@ -53,4 +53,3 @@ export declare class CryptoError extends BaseError {
|
|
|
53
53
|
export declare function createCryptoError(message?: string, options?: CryptoErrorOptions): CryptoError;
|
|
54
54
|
/** Determines whether an unknown value is a CryptoError. */
|
|
55
55
|
export declare function isCryptoError(value: unknown): value is CryptoError;
|
|
56
|
-
//# sourceMappingURL=cryptoError.base.d.ts.map
|
|
@@ -12,4 +12,3 @@ export declare function cryptoSignatureError(message?: string, operation?: Crypt
|
|
|
12
12
|
export declare function cryptoKeyDerivationError(message?: string, algorithm?: string): CryptoError;
|
|
13
13
|
/** Creates a cryptographic key error. */
|
|
14
14
|
export declare function cryptoKeyError(message?: string, operation?: CryptoOperation.KEY_GENERATION | CryptoOperation.KEY_IMPORT | CryptoOperation.KEY_EXPORT, algorithm?: string): CryptoError;
|
|
15
|
-
//# sourceMappingURL=cryptoError.factory.d.ts.map
|
package/dist/system/index.d.ts
CHANGED
package/dist/system/index.js
CHANGED
|
@@ -21,4 +21,3 @@ export declare function createLoggingError(message: string, options?: LoggingErr
|
|
|
21
21
|
* Determines whether an unknown value is a LoggingError.
|
|
22
22
|
*/
|
|
23
23
|
export declare function isLoggingError(value: unknown): value is LoggingError;
|
|
24
|
-
//# sourceMappingURL=logging.error.d.ts.map
|
|
@@ -37,4 +37,3 @@ export declare class RuntimeError extends BaseError {
|
|
|
37
37
|
export declare function createRuntimeError(message: string, options?: RuntimeErrorOptions): RuntimeError;
|
|
38
38
|
/** Determines whether an unknown value is a RuntimeError. */
|
|
39
39
|
export declare function isRuntimeError(value: unknown): value is RuntimeError;
|
|
40
|
-
//# sourceMappingURL=runtimeError.base.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export { SystemError, createSystemError, isSystemError, SystemOperation, } from "./systemError.base.js";
|
|
5
5
|
export type { SystemErrorOptions } from "./systemError.base.js";
|
|
6
6
|
export { systemInitializationError, systemStartupError, systemShutdownError, internalSystemError, } from "./systemError.factory.js";
|
|
7
|
-
//# sourceMappingURL=system.error.d.ts.map
|
|
@@ -3,4 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { SystemError, createSystemError, isSystemError, SystemOperation, } from "./systemError.base.js";
|
|
5
5
|
export { systemInitializationError, systemStartupError, systemShutdownError, internalSystemError, } from "./systemError.factory.js";
|
|
6
|
-
//# sourceMappingURL=system.error.js.map
|
|
@@ -42,4 +42,3 @@ export declare class SystemError extends BaseError {
|
|
|
42
42
|
export declare function createSystemError(message?: string, options?: SystemErrorOptions): SystemError;
|
|
43
43
|
/** Determines whether an unknown value is a SystemError. */
|
|
44
44
|
export declare function isSystemError(value: unknown): value is SystemError;
|
|
45
|
-
//# sourceMappingURL=systemError.base.d.ts.map
|
|
@@ -10,4 +10,3 @@ export declare function systemStartupError(message: string, cause?: unknown): Sy
|
|
|
10
10
|
export declare function systemShutdownError(message: string, cause?: unknown): SystemError;
|
|
11
11
|
/** Creates an internal system error. */
|
|
12
12
|
export declare function internalSystemError(message: string, cause?: unknown): SystemError;
|
|
13
|
-
//# sourceMappingURL=systemError.factory.d.ts.map
|
|
@@ -13,6 +13,7 @@ export declare class ErrorHandler {
|
|
|
13
13
|
private readonly defaultMessage;
|
|
14
14
|
private readonly includeStack;
|
|
15
15
|
private readonly publicMetadataKeys;
|
|
16
|
+
private readonly exposeMetadata;
|
|
16
17
|
private readonly sensitiveKeyPattern;
|
|
17
18
|
constructor(options?: ErrorHandlerOptions);
|
|
18
19
|
/** Converts an unknown thrown value into a BaseError. */
|
|
@@ -61,4 +62,3 @@ export declare class ErrorHandler {
|
|
|
61
62
|
/** Removes obviously sensitive fields from metadata (recursively). */
|
|
62
63
|
private redact;
|
|
63
64
|
}
|
|
64
|
-
//# sourceMappingURL=errorHandler.core.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized error normalization, serialization, and reporting service.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { redactErrorMetadata, serializeErrorMetadata, } from "../base/core/errorMetadata.core.js";
|
|
5
5
|
import { isBaseError, normalizeUnknownToBaseError, } from "../base/utils/baseError.utils.js";
|
|
6
6
|
import { ErrorSerializer } from "./errorSerializer.core.js";
|
|
7
|
+
import { selectPublicIssues, selectPublicMetadata, } from "./errorSerializer.public.js";
|
|
7
8
|
export { createErrorHandler, normalizeError, isHandledError, } from "./errorHandler.factory.js";
|
|
8
9
|
/** Centralized error normalization, serialization, and reporting service. */
|
|
9
10
|
export class ErrorHandler {
|
|
@@ -13,6 +14,7 @@ export class ErrorHandler {
|
|
|
13
14
|
defaultMessage;
|
|
14
15
|
includeStack;
|
|
15
16
|
publicMetadataKeys;
|
|
17
|
+
exposeMetadata;
|
|
16
18
|
sensitiveKeyPattern;
|
|
17
19
|
constructor(options = {}) {
|
|
18
20
|
this.reporter = options.reporter;
|
|
@@ -22,6 +24,7 @@ export class ErrorHandler {
|
|
|
22
24
|
options.defaultMessage ?? "An unexpected error occurred.";
|
|
23
25
|
this.includeStack = options.includeStack ?? false;
|
|
24
26
|
this.publicMetadataKeys = options.publicMetadataKeys;
|
|
27
|
+
this.exposeMetadata = options.exposeMetadata ?? false;
|
|
25
28
|
this.sensitiveKeyPattern = options.sensitiveKeyPattern;
|
|
26
29
|
}
|
|
27
30
|
/** Converts an unknown thrown value into a BaseError. */
|
|
@@ -88,13 +91,12 @@ export class ErrorHandler {
|
|
|
88
91
|
* fields and non-exposed metadata are never revealed.
|
|
89
92
|
*/
|
|
90
93
|
toPublicResult(error, context) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
94
|
+
const details = selectPublicMetadata(error, {
|
|
95
|
+
publicMetadataKeys: this.publicMetadataKeys,
|
|
96
|
+
exposeMetadata: this.exposeMetadata,
|
|
97
|
+
sensitiveKeyPattern: this.sensitiveKeyPattern,
|
|
98
|
+
});
|
|
99
|
+
const issues = selectPublicIssues(error);
|
|
98
100
|
return {
|
|
99
101
|
code: error.code,
|
|
100
102
|
message: error.expose ? error.message : this.defaultMessage,
|
|
@@ -103,9 +105,8 @@ export class ErrorHandler {
|
|
|
103
105
|
...(context?.correlationId
|
|
104
106
|
? { correlationId: context.correlationId }
|
|
105
107
|
: {}),
|
|
106
|
-
...(details !== undefined
|
|
107
|
-
|
|
108
|
-
: {}),
|
|
108
|
+
...(details !== undefined ? { details } : {}),
|
|
109
|
+
...(issues !== undefined ? { issues } : {}),
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
/** Reports an error without producing a response. */
|
|
@@ -174,4 +175,3 @@ export class ErrorHandler {
|
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
|
-
//# sourceMappingURL=errorHandler.core.js.map
|
|
@@ -10,4 +10,3 @@ export declare function createErrorHandler(options?: ErrorHandlerOptions): Error
|
|
|
10
10
|
export declare function normalizeError(value: unknown): BaseError;
|
|
11
11
|
/** Determines whether an unknown value is a supported BaseError. */
|
|
12
12
|
export declare function isHandledError(value: unknown): value is BaseError;
|
|
13
|
-
//# sourceMappingURL=errorHandler.factory.d.ts.map
|
|
@@ -46,6 +46,8 @@ export interface PublicErrorHandlerResult {
|
|
|
46
46
|
readonly correlationId?: string;
|
|
47
47
|
/** Allow-listed, redacted metadata (see `ErrorHandlerOptions.publicMetadataKeys`). */
|
|
48
48
|
readonly details?: Readonly<Record<string, unknown>>;
|
|
49
|
+
/** Issues of an exposable validation or schema error, values redacted. */
|
|
50
|
+
readonly issues?: readonly unknown[];
|
|
49
51
|
}
|
|
50
52
|
/** Callback used to report errors to an external logger or monitoring system. */
|
|
51
53
|
export type ErrorReporter = (error: BaseError, context?: ErrorHandlerContext) => void | Promise<void>;
|
|
@@ -68,12 +70,17 @@ export interface ErrorHandlerOptions {
|
|
|
68
70
|
*/
|
|
69
71
|
readonly includeStack?: boolean;
|
|
70
72
|
/**
|
|
71
|
-
* Metadata keys copied into `PublicErrorHandlerResult.details
|
|
72
|
-
* exposed errors
|
|
73
|
-
*
|
|
73
|
+
* Metadata keys copied into `PublicErrorHandlerResult.details`, for exposed
|
|
74
|
+
* and non-exposed errors alike. When omitted, no metadata is published
|
|
75
|
+
* unless `exposeMetadata` is set.
|
|
74
76
|
*/
|
|
75
77
|
readonly publicMetadataKeys?: readonly string[];
|
|
78
|
+
/**
|
|
79
|
+
* Copy the whole (redacted) metadata of errors with `expose: true` into
|
|
80
|
+
* `details`. Defaults to false; see `ErrorSerializerOptions.exposeMetadata`
|
|
81
|
+
* for why this is opt-in. Ignored when `publicMetadataKeys` is set.
|
|
82
|
+
*/
|
|
83
|
+
readonly exposeMetadata?: boolean;
|
|
76
84
|
/** Pattern used to detect sensitive metadata keys. */
|
|
77
85
|
readonly sensitiveKeyPattern?: RegExp;
|
|
78
86
|
}
|
|
79
|
-
//# sourceMappingURL=errorHandler.types.d.ts.map
|
|
@@ -4,4 +4,3 @@
|
|
|
4
4
|
export type { ErrorMapperContext, ErrorMapping, ErrorMapperPredicate, ErrorMapper, ErrorMappingRule, } from "./errorMapper.types.js";
|
|
5
5
|
export { ErrorMapperRegistry, createErrorMapperRegistry, } from "./errorMapper.registry.js";
|
|
6
6
|
export { mapNativeError, mapError, mapErrorType, createErrorMappingRule, applyErrorMapping, type ErrorConstructor, } from "./errorMapper.mappers.js";
|
|
7
|
-
//# sourceMappingURL=errorMapper.core.d.ts.map
|
|
@@ -33,4 +33,3 @@ export declare function mapErrorType<T extends Error>(name: string, errorType: E
|
|
|
33
33
|
export declare function createErrorMappingRule(name: string, predicate: ErrorMapperPredicate, mapper: ErrorMapper | ErrorMapping, priority?: number): ErrorMappingRule;
|
|
34
34
|
/** Builds a BaseError from a declarative `ErrorMapping`. */
|
|
35
35
|
export declare function applyErrorMapping(error: unknown, mapping: ErrorMapping, context?: ErrorMapperContext): BaseError;
|
|
36
|
-
//# sourceMappingURL=errorMapper.mappers.d.ts.map
|
|
@@ -14,6 +14,7 @@ export declare class ErrorSerializer {
|
|
|
14
14
|
private readonly redactSensitiveData;
|
|
15
15
|
private readonly sensitiveKeyPattern;
|
|
16
16
|
private readonly publicMetadataKeys;
|
|
17
|
+
private readonly exposeMetadata;
|
|
17
18
|
constructor(options?: ErrorSerializerOptions);
|
|
18
19
|
/**
|
|
19
20
|
* Serializes an error for internal logging or monitoring.
|
|
@@ -26,9 +27,11 @@ export declare class ErrorSerializer {
|
|
|
26
27
|
/**
|
|
27
28
|
* Serializes an error for an untrusted API client.
|
|
28
29
|
*
|
|
29
|
-
* Never includes a stack or cause. Metadata is
|
|
30
|
-
*
|
|
31
|
-
* is
|
|
30
|
+
* Never includes a stack or cause. Metadata is included only for keys
|
|
31
|
+
* allow-listed by `publicMetadataKeys`, or, with `exposeMetadata`, for
|
|
32
|
+
* errors with `expose: true`; either way it is redacted. The `issues` of an
|
|
33
|
+
* exposable validation or schema error are included with submitted values
|
|
34
|
+
* replaced by type descriptions.
|
|
32
35
|
*/
|
|
33
36
|
serializePublic(error: BaseError): PublicErrorResponse;
|
|
34
37
|
/** Serializes an unknown thrown value. */
|
|
@@ -51,4 +54,3 @@ export declare class ErrorSerializer {
|
|
|
51
54
|
/** Removes commonly sensitive metadata fields (recursively). */
|
|
52
55
|
private redactMetadata;
|
|
53
56
|
}
|
|
54
|
-
//# sourceMappingURL=errorSerializer.core.d.ts.map
|