Test_FiberHandler_WithErrorInHandler() — fiber Function Reference
Architecture documentation for the Test_FiberHandler_WithErrorInHandler() function in adaptor_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 835c6f5d_5741_0287_d7c9_93e58f08c74c["Test_FiberHandler_WithErrorInHandler()"] 8ec96b38_44b4_af66_6f6f_dd60f87b680c["adaptor_test.go"] 835c6f5d_5741_0287_d7c9_93e58f08c74c -->|defined in| 8ec96b38_44b4_af66_6f6f_dd60f87b680c style 835c6f5d_5741_0287_d7c9_93e58f08c74c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/adaptor/adaptor_test.go lines 935–956
func Test_FiberHandler_WithErrorInHandler(t *testing.T) {
t.Parallel()
// Test error handling in fiber handler
fiberH := func(c fiber.Ctx) error {
return fiber.NewError(fiber.StatusTeapot, "I'm a teapot")
}
handlerFunc := FiberHandlerFunc(fiberH)
r := &http.Request{
Method: http.MethodGet,
RequestURI: "/test",
Header: make(http.Header),
Body: http.NoBody,
}
w := &netHTTPResponseWriter{}
handlerFunc.ServeHTTP(w, r)
// Should return the error status
require.Equal(t, fiber.StatusTeapot, w.StatusCode())
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_FiberHandler_WithErrorInHandler() do?
Test_FiberHandler_WithErrorInHandler() is a function in the fiber codebase, defined in middleware/adaptor/adaptor_test.go.
Where is Test_FiberHandler_WithErrorInHandler() defined?
Test_FiberHandler_WithErrorInHandler() is defined in middleware/adaptor/adaptor_test.go at line 935.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free