Skip to content

Commit d942cb3

Browse files
authored
fix: remove HttpError from Handler error channel (#638)
* fix: remove `HttpError` from Handler error channel * chore: update dependencies
1 parent 3ba77c6 commit d942cb3

File tree

7 files changed

+101
-95
lines changed

7 files changed

+101
-95
lines changed

.changeset/lovely-eagles-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"effect-http": patch
3+
---
4+
5+
Exclude `HttpError.HttpError` from the Handler error channel.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@effect/eslint-plugin": "^0.2.0",
3333
"@effect/language-service": "^0.1.0",
3434
"@effect/vitest": "^0.6.11",
35-
"@types/node": "^20.14.11",
35+
"@types/node": "^20.14.12",
3636
"@types/swagger-ui-dist": "^3.30.5",
3737
"@typescript-eslint/eslint-plugin": "^7.17.0",
3838
"@typescript-eslint/parser": "^7.17.0",

packages/effect-http-node/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
"effect-http": "workspace:^"
4040
},
4141
"devDependencies": {
42-
"@effect/platform": "^0.60.0",
43-
"@effect/platform-bun": "^0.40.0",
44-
"@effect/platform-node": "^0.55.0",
45-
"@effect/schema": "^0.69.0",
46-
"@types/node": "^20.14.11",
47-
"effect": "^3.5.7",
42+
"@effect/platform": "^0.60.2",
43+
"@effect/platform-bun": "^0.40.2",
44+
"@effect/platform-node": "^0.55.2",
45+
"@effect/schema": "^0.69.2",
46+
"@types/node": "^20.14.12",
47+
"effect": "^3.5.8",
4848
"effect-http": "workspace:^"
4949
}
5050
}

packages/effect-http/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
},
3838
"devDependencies": {
3939
"@apidevtools/swagger-parser": "^10.1.0",
40-
"@effect/platform": "^0.60.0",
41-
"@effect/schema": "^0.69.0",
42-
"effect": "^3.5.7"
40+
"@effect/platform": "^0.60.2",
41+
"@effect/schema": "^0.69.2",
42+
"effect": "^3.5.8"
4343
}
4444
}

packages/effect-http/src/Handler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type * as Types from "effect/Types"
1212
import type * as ApiEndpoint from "./ApiEndpoint.js"
1313
import type * as ApiRequest from "./ApiRequest.js"
1414
import type * as ApiResponse from "./ApiResponse.js"
15+
import type * as HttpError from "./HttpError.js"
1516
import * as internal from "./internal/handler.js"
1617
import type * as utils from "./internal/utils.js"
1718
import type * as Security from "./Security.js"
@@ -133,12 +134,12 @@ export const make: {
133134
<A extends ApiEndpoint.ApiEndpoint.Any, E, R>(
134135
fn: Handler.Function<A, E, R>,
135136
options?: Partial<Options>
136-
): (endpoint: A) => Handler<A, E, R>
137+
): (endpoint: A) => Handler<A, Exclude<E, HttpError.HttpError>, R>
137138
<A extends ApiEndpoint.ApiEndpoint.Any, E, R>(
138139
endpoint: A,
139140
fn: Handler.Function<A, E, R>,
140141
options?: Partial<Options>
141-
): Handler<A, E, R>
142+
): Handler<A, Exclude<E, HttpError.HttpError>, R>
142143
} = internal.make
143144

144145
/**

packages/effect-http/src/internal/handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ export const make: {
4141
<A extends ApiEndpoint.ApiEndpoint.Any, E, R>(
4242
fn: Handler.Handler.Function<A, E, R>,
4343
options?: Partial<Handler.Options>
44-
): (endpoint: A) => Handler.Handler<A, E, R>
44+
): (endpoint: A) => Handler.Handler<A, Exclude<E, HttpError.HttpError>, R>
4545
<A extends ApiEndpoint.ApiEndpoint.Any, E, R>(
4646
endpoint: A,
4747
fn: Handler.Handler.Function<A, E, R>,
4848
options?: Partial<Handler.Options>
49-
): Handler.Handler<A, E, R>
49+
): Handler.Handler<A, Exclude<E, HttpError.HttpError>, R>
5050
} = (...args: readonly [any, any]) => {
5151
if (ApiEndpoint.isApiEndpoint(args[0])) {
5252
return _make(...args) as any

0 commit comments

Comments
 (0)