From c9e59c9db898357ead014fb77f9e4a20161a7ef8 Mon Sep 17 00:00:00 2001 From: Maxim Khramtsov Date: Tue, 19 Nov 2024 17:07:33 +0100 Subject: [PATCH] fix HttpApiGroup.addError --- .changeset/witty-boxes-teach.md | 5 +++++ packages/platform/src/HttpApiGroup.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/witty-boxes-teach.md diff --git a/.changeset/witty-boxes-teach.md b/.changeset/witty-boxes-teach.md new file mode 100644 index 00000000000..80d8af4bab6 --- /dev/null +++ b/.changeset/witty-boxes-teach.md @@ -0,0 +1,5 @@ +--- +"@effect/platform": patch +--- + +fix HttpApiGroup.addError signature diff --git a/packages/platform/src/HttpApiGroup.ts b/packages/platform/src/HttpApiGroup.ts index 36705537a3b..9225361ce35 100644 --- a/packages/platform/src/HttpApiGroup.ts +++ b/packages/platform/src/HttpApiGroup.ts @@ -66,12 +66,12 @@ export interface HttpApiGroup< * Add an error schema to an `HttpApiGroup`, which is shared by all endpoints in the * group. */ - addError( - schema: Schema.Schema, + addError( + schema: Schema.Schema, annotations?: { readonly status?: number | undefined } - ): HttpApiGroup + ): HttpApiGroup /** * Add a path prefix to all endpoints in an `HttpApiGroup`. Note that this will only