(tag: Tag)
| 167 | } |
| 168 | |
| 169 | const 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. |
no outgoing calls
no test coverage detected