MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestIsLimitExceeded_WrappedError

Function TestIsLimitExceeded_WrappedError

internal/limits/limits_test.go:257–264  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

255}
256
257func TestIsLimitExceeded_WrappedError(t *testing.T) {
258 base := &LimitExceededError{Resource: "agents", Limit: 1, Current: 1}
259 wrapped := wrap(base)
260 got, ok := IsLimitExceeded(wrapped)
261 if !ok || got != base {
262 t.Errorf("IsLimitExceeded did not unwrap: ok=%v got=%v", ok, got)
263 }
264}
265
266// wrap exists to test errors.As traversal through fmt.Errorf chains —
267// real callers will commonly wrap with context.

Callers

nothing calls this directly

Calls 2

wrapFunction · 0.85
IsLimitExceededFunction · 0.85

Tested by

no test coverage detected