Test_App_UseMountedErrorHandlerRootLevel() — fiber Function Reference
Architecture documentation for the Test_App_UseMountedErrorHandlerRootLevel() function in mount_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 6c7a8a64_320f_9202_515a_80f99f297033["Test_App_UseMountedErrorHandlerRootLevel()"] dbd7cc10_1955_3f67_b103_5ae841223af0["mount_test.go"] 6c7a8a64_320f_9202_515a_80f99f297033 -->|defined in| dbd7cc10_1955_3f67_b103_5ae841223af0 style 6c7a8a64_320f_9202_515a_80f99f297033 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
mount_test.go lines 320–337
func Test_App_UseMountedErrorHandlerRootLevel(t *testing.T) {
t.Parallel()
app := New()
fiber := New(Config{
ErrorHandler: func(c Ctx, _ error) error {
return c.Status(500).SendString("hi, i'm a custom error")
},
})
fiber.Get("/api", func(_ Ctx) error {
return errors.New("something happened")
})
app.Use("/", fiber)
resp, err := app.Test(httptest.NewRequest(MethodGet, "/api", http.NoBody))
testErrorResponse(t, err, resp, "hi, i'm a custom error")
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_App_UseMountedErrorHandlerRootLevel() do?
Test_App_UseMountedErrorHandlerRootLevel() is a function in the fiber codebase, defined in mount_test.go.
Where is Test_App_UseMountedErrorHandlerRootLevel() defined?
Test_App_UseMountedErrorHandlerRootLevel() is defined in mount_test.go at line 320.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free