refactor(http-recorder): use Schema.TaggedErrorClass for cassette errors (#26729)
This commit is contained in:
parent
b616543ac2
commit
e45b6ef1de
3 changed files with 18 additions and 14 deletions
|
|
@ -95,10 +95,13 @@ export const redactHeaders = (
|
|||
)
|
||||
}
|
||||
|
||||
export type SecretFinding = {
|
||||
readonly path: string
|
||||
readonly reason: string
|
||||
}
|
||||
import { Schema } from "effect"
|
||||
|
||||
export const SecretFindingSchema = Schema.Struct({
|
||||
path: Schema.String,
|
||||
reason: Schema.String,
|
||||
})
|
||||
export type SecretFinding = Schema.Schema.Type<typeof SecretFindingSchema>
|
||||
|
||||
export const secretFindings = (value: unknown): ReadonlyArray<SecretFinding> =>
|
||||
stringEntries(value).flatMap((entry) => [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue