{"id":"39355a16957c24c2","repo":"gofiber/fiber","slug":"client-cannot-be-nil","errorCode":null,"errorMessage":"client cannot be nil","messagePattern":"client cannot be nil","errorType":"exception","errorClass":"ErrClientNil","httpStatus":null,"severity":"error","filePath":"client/request.go","lineNumber":42,"sourceCode":"\tAdd(name, obj string)\n\tDel(name string)\n}\n\n// bodyType defines the type of request body.\ntype bodyType int\n\n// Enumeration of request body types.\nconst (\n\tnoBody bodyType = iota\n\tjsonBody\n\txmlBody\n\tformBody\n\tfilesBody\n\trawBody\n\tcborBody\n)\n\nvar ErrClientNil = errors.New(\"client cannot be nil\")\n\n// Request contains all data related to an HTTP request.\ntype Request struct {\n\tctx context.Context //nolint:containedctx // Context is needed to be stored in the request.\n\n\tbody    any\n\theader  Header\n\tparams  QueryParam\n\tcookies Cookie\n\tpath    PathParam\n\n\tclient *Client\n\n\tformData FormData\n\n\tRawRequest *fasthttp.Request\n\turl        string\n\tmethod     string","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/gofiber/fiber/blob/9a4c7e57fe0b080a04235d28a4b0d2b4b353d58c/client/request.go#L24-L60","documentation":"Error \"client cannot be nil\" thrown in gofiber/fiber.","triggerScenarios":"Thrown at client/request.go:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"9a4c7e57fe0b080a04235d28a4b0d2b4b353d58c","analyzedAt":"2026-08-04T21:44:03.395Z","schemaVersion":2}