-
-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
Describe the problem you'd like to have solved
I'd like to have a way to specify which kind of Interaction
to skip from being recorded on disk inside a cassette. This would be useful for example if I don't want the cassette spammed with 429s.
Describe the ideal solution
Perhaps something like:
recorder.AddHook(
func(i *cassette.Interaction) error {
if i.Response.Code == http.StatusTooManyRequests {
i.Skip()
return nil
}
return nil
},
recorder.BeforeSaveHook,
)
Alternatives and current workarounds
Current workaround would be to manually remove them from the cassette file.
Additional context
- Perhaps it helps to see how we're using this pkg -> https://github.com/auth0/terraform-provider-auth0/blob/main/internal/recorder/http_recorder.go
Thanks a lot for maintaining this! It's a great project. 👍🏻
Metadata
Metadata
Assignees
Labels
No labels