{"record":{"id":"c7bb47a0f0a104e2","repo":"hasura/graphql-engine","slug":"error-parsing-the-request-0-c7bb47","errorCode":null,"errorMessage":"Error parsing the request: {0}","messagePattern":"Error parsing the request: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-response-plugin/src/execute/common.rs","lineNumber":23,"sourceCode":"    response::IntoResponse,\n};\n\nuse hasura_authn_core::Session;\nuse lang_graphql::{ast::common as ast, http::RawRequest};\nuse open_dds::plugins::{LifecyclePluginUrl, LifecyclePreResponsePluginHookConfigRequest};\nuse reqwest::header::HeaderValue;\nuse serde::Serialize;\nuse tracing_util::{ErrorVisibility, TraceableError};\n\n#[derive(Debug, thiserror::Error)]\npub enum Error {\n    #[error(\"Error while making the HTTP request to the pre-parse plugin {0} - {1}\")]\n    ErrorWhileMakingHTTPRequestToTheHook(String, reqwest::Error),\n    #[error(\"Error while building the request for the pre-parse plugin {0} - {1}\")]\n    BuildRequestError(String, String),\n    #[error(\"Reqwest error: {0}\")]\n    ReqwestError(reqwest::Error),\n    #[error(\"Error parsing the request: {0}\")]\n    PluginRequestParseError(serde_json::Error),\n    #[error(\"Error parsing the engine response: {0}\")]\n    EngineResponseParseError(serde_json::Error),\n    #[error(\"Unexpected status code: {0}\")]\n    UnexpectedStatusCode(u16),\n    #[error(\"Error serializing the modified response: {0}\")]\n    ResponseSerializationError(serde_json::Error),\n    #[error(\"Error while preparing the response: {0}\")]\n    ResponsePreparationError(axum::http::Error),\n}\n\nimpl TraceableError for Error {\n    fn visibility(&self) -> ErrorVisibility {\n        ErrorVisibility::Internal\n    }\n}\n\nimpl Error {","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-response-plugin/src/execute/common.rs#L5-L41","documentation":"The pre-response plugin failed to parse JSON while constructing or handling the hook request payload (serde_json::Error). It indicates the request-side schema does not match what the executor expects.","triggerScenarios":"The serialized request body for the hook does not deserialize into the expected request type — typically when the engine version and plugin version disagree on the request schema.","commonSituations":"Mixed engine/plugin versions after a partial upgrade; hand-rolled mock hook emitting an incompatible request shape in tests.","solutions":["Use matching versions of the engine and pre-response plugin crates.","Capture the failing JSON payload in logs and diff it against the expected schema.","Fix the mock/hook implementation in tests to emit the contract-compliant shape."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// in tests, assert your mock emits the contract shape\nserde_json::from_value::<PluginRequest>(mock_json).expect(\"mock must match contract\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use matching engine/plugin versions.","Generate mock hook fixtures from the real shared types.","Fail CI when shared schema types change without version bump."],"tags":["json","serde","plugin","rust","pre-response-hook"],"backgroundTag":"json-deserialization-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}