{"record":{"id":"17224cc9ca02c6ae","repo":"vercel/next.js","slug":"your-getserversideprops-function-did-not-return","errorCode":null,"errorMessage":"Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?","messagePattern":"Your `getServerSideProps` function did not return an object\\. Did you forget to add a `return`\\?","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/render.tsx","lineNumber":1140,"sourceCode":"            defaultLocale: renderOpts.defaultLocale,\n          })\n      )\n      canAccessRes = false\n      metadata.cacheControl = { revalidate: 0, expire: undefined }\n    } catch (serverSidePropsError: any) {\n      // remove not found error code to prevent triggering legacy\n      // 404 rendering\n      if (\n        isError(serverSidePropsError) &&\n        serverSidePropsError.code === 'ENOENT'\n      ) {\n        delete serverSidePropsError.code\n      }\n      throw serverSidePropsError\n    }\n\n    if (data == null) {\n      throw new Error(GSSP_NO_RETURNED_VALUE)\n    }\n\n    if ((data as any).props instanceof Promise) {\n      deferredContent = true\n    }\n\n    const invalidKeys = Object.keys(data).filter(\n      (key) => key !== 'props' && key !== 'redirect' && key !== 'notFound'\n    )\n\n    if ((data as any).unstable_notFound) {\n      throw new Error(\n        `unstable_notFound has been renamed to notFound, please update the field to continue. Page: ${pathname}`\n      )\n    }\n    if ((data as any).unstable_redirect) {\n      throw new Error(\n        `unstable_redirect has been renamed to redirect, please update the field to continue. Page: ${pathname}`","sourceCodeStart":1122,"sourceCodeEnd":1158,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/server/render.tsx#L1122-L1158","documentation":"Renders the GSSP_NO_RETURNED_VALUE invariant in renderToHTMLImpl: after awaiting the user's getServerSideProps the resolved data is null/undefined. The input at fault is the function's return value — usually a forgotten return or an early code path that returns nothing — which cannot be turned into page props.","triggerScenarios":"Thrown at packages/next/src/server/render.tsx:1142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make `getServerSideProps` return an object, e.g. `return { props: {} }`.","Check all code paths (including early returns and error branches) return an object."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89d017eac43ebf4742ed2b58d3c1373b70283b69","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}