{"record":{"id":"548d49f8da75e37e","repo":"facebook/relay","slug":"relay-missing-required-value-at-path-fielderr","errorCode":null,"errorMessage":"Relay: Missing @required value at path '${fieldError.fieldPath}' in '${fieldError.owner}': ${reason}.","messagePattern":"Relay: Missing @required value at path '(.+?)' in '(.+?)': (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/relay-runtime/util/handlePotentialSnapshotErrors.js","lineNumber":70,"sourceCode":"          throw new Error(\n            `Relay: Received a field error in the server response for field '${fieldError.fieldPath}' in '${fieldError.owner}'. Message: ${fieldError.error.message}`,\n          );\n        case 'missing_expected_data.throw':\n          throw new Error(\n            `Relay: Missing expected data at path '${fieldError.fieldPath}' in '${fieldError.owner}'. See https://relay.dev/docs/next/debugging/why-null/ for likely causes.`,\n          );\n        case 'missing_required_field.throw': {\n          let reason: string;\n          if (fieldError.fieldValue === null) {\n            reason =\n              fieldError.fieldError != null\n                ? `the server returned null with an error: ${fieldError.fieldError.message}`\n                : 'the server returned null';\n          } else {\n            reason =\n              'the field was missing in the store (data may not have been fetched, or was removed by a graph relationship change: https://relay.dev/docs/next/debugging/why-null/#graph-relationship-change)';\n          }\n          throw new Error(\n            `Relay: Missing @required value at path '${fieldError.fieldPath}' in '${fieldError.owner}': ${reason}.`,\n          );\n        }\n        case 'missing_required_field.log':\n        case 'missing_expected_data.log':\n          // These should have already been filtered out. Sadly, Flow Type\n          // Guards don't work well with refining discriminated unions, so we\n          // can't assert this via types.\n          break;\n        default:\n          fieldError.kind as empty;\n          invariant(false, 'Relay: Unexpected event kind: %s', fieldError.kind);\n      }\n    }\n  }\n}\n\nfunction eventShouldThrow(event: FieldError): boolean {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/facebook/relay/blob/668b1b85e06261aa3b58dabfc51f8b5524a70955/packages/relay-runtime/util/handlePotentialSnapshotErrors.js#L52-L88","documentation":"Thrown by handleFieldErrors when a field marked @required resolves to a missing value (null or an error) at the required path. Relay enforces @required as a hard invariant: the server response failed to satisfy the fragment contract, so the snapshot cannot be trusted and the read is aborted with an exception rather than returning null. The message distinguishes null fieldValue from an underlying field error as the reason.","triggerScenarios":"Thrown at packages/relay-runtime/util/handlePotentialSnapshotErrors.js:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the server response for the field at fieldError.fieldPath — it was null or errored despite @required","Verify the @required directive's arguments (@required(action: THROW) vs LOG) match the intended nullability semantics","Use the Relay DevTools or the why-null debugging guide to trace which resolver/link in the owner produced the missing value","If the field can legitimately be absent, remove @required or switch to @required(action: LOG) and handle null in UI code","Fix an upstream resolver or @relay_resolver that fails to propagate a value"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"668b1b85e06261aa3b58dabfc51f8b5524a70955","analyzedAt":"2026-09-02T19:57:20.783Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}