Preserve caller cancellation in HTTP smoke probes
This commit is contained in:
@@ -106,7 +106,7 @@ func (p authenticationProbe) runOpenRouterKey(
|
||||
}
|
||||
recognized, bodyErr := recognizedOpenRouterKeyResponse(response.Body)
|
||||
if bodyErr != nil {
|
||||
outcome.failure = generation.ClassifyFailure(fmt.Errorf("%w: %w", llm.ErrTransport, bodyErr))
|
||||
outcome.failure = httpProbeFailure(ctx, bodyErr)
|
||||
return outcome, nil
|
||||
}
|
||||
if recognized {
|
||||
@@ -123,9 +123,9 @@ func (p authenticationProbe) runOpenRouterKey(
|
||||
|
||||
if evidence.DispatchInvoked {
|
||||
if requestErr != nil {
|
||||
outcome.failure = generation.ClassifyFailure(fmt.Errorf("%w: %w", llm.ErrTransport, requestErr))
|
||||
outcome.failure = httpProbeFailure(ctx, requestErr)
|
||||
} else {
|
||||
outcome.failure = generation.ClassifyFailure(llm.ErrTransport)
|
||||
outcome.failure = httpProbeFailure(ctx, nil)
|
||||
}
|
||||
return outcome, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user