{"record":{"id":"02aab73b66b84c1e","repo":"hpyhacking/peatio","slug":"attempt-to-set-body-attribute-of-a-content-object","errorCode":null,"errorMessage":"Attempt to set body attribute of a content object when the data attributes was already set.","messagePattern":"Attempt to set body attribute of a content object when the data attributes was already set\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/assets/javascripts/swagger-ui/lib/shred/content.js","lineNumber":189,"sourceCode":"    },\n    stringify: function(data) {\n      return JSON.stringify(data); }});\n\nvar qs = require('querystring');\n// Register the post processor, which is used for JSON-based media types.\nContent.registerProcessor(\n  [\"application/x-www-form-urlencoded\"],\n  { parser : qs.parse, stringify : qs.stringify });\n\n// Error functions are defined separately here in an attempt to make the code\n// easier to read.\nvar Errors = {\n  setDataWithBody: function(object) {\n    throw new Error(\"Attempt to set data attribute of a content object \" +\n        \"when the body attributes was already set.\");\n  },\n  setBodyWithData: function(object) {\n    throw new Error(\"Attempt to set body attribute of a content object \" +\n        \"when the data attributes was already set.\");\n  }\n}\nmodule.exports = Content;","sourceCodeStart":171,"sourceCodeEnd":193,"githubUrl":"https://github.com/hpyhacking/peatio/blob/dab8641137c008928c835409342519bfef4eae7f/app/assets/javascripts/swagger-ui/lib/shred/content.js#L171-L193","documentation":"Error \"Attempt to set body attribute of a content object when the data attributes was already set.\" thrown in hpyhacking/peatio.","triggerScenarios":"Thrown at app/assets/javascripts/swagger-ui/lib/shred/content.js:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set either the body attribute or the data attributes on the content object, not both; create a fresh content object if you need a different representation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dab8641137c008928c835409342519bfef4eae7f","analyzedAt":"2026-08-23T09:59:18.005Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}