MCPcopy Create free account
hub / github.com/Effect-TS/effect / ReasonError

Function ReasonError

packages/effect/src/http/HttpClientError.ts:169–182  ·  view source on GitHub ↗
(tag: Tag)

Source from the content-addressed store, hash-verified

167}
168
169const ReasonError = <Tag extends string>(tag: Tag): ReturnType<typeof Data.TaggedError<Tag>> => {
170 class Base extends Data.TaggedError(tag)<ReasonProps> {
171 constructor(props: ReasonProps) {
172 super(props)
173 const url = UrlParams.redactUrl(props.request.url)
174 const path = currentClientPath()
175 redactedUrls.set(this, path === undefined ? url : redactClientPath(url, path))
176 if (props.response !== undefined) {
177 addRedactedNames(this, responseRedactedNames.get(props.response), responseRedactedPaths.get(props.response))
178 }
179 }
180 }
181 return Base as any
182}
183
184// Rendering adds the names of the rendering fiber to the stored URL, so it
185// never redacts less than the names active at either point.

Callers 6

TransportErrorClass · 0.85
EncodeErrorClass · 0.85
InvalidUrlErrorClass · 0.85
StatusCodeErrorClass · 0.85
DecodeErrorClass · 0.85
EmptyBodyErrorClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected