{"record":{"id":"e18b7b850375ad1e","repo":"hpyhacking/peatio","slug":"attempt-to-set-data-attribute-of-a-content-object","errorCode":null,"errorMessage":"Attempt to set data attribute of a content object when the body attributes was already set.","messagePattern":"Attempt to set data attribute of a content object when the body attributes was already set\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/assets/javascripts/swagger-ui/lib/shred/content.js","lineNumber":185,"sourceCode":"  [\"application/json; charset=utf-8\",\"application/json\",\"json\"],\n  {\n    parser: function(string) {\n      return JSON.parse(string);\n    },\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":167,"sourceCodeEnd":193,"githubUrl":"https://github.com/hpyhacking/peatio/blob/dab8641137c008928c835409342519bfef4eae7f/app/assets/javascripts/swagger-ui/lib/shred/content.js#L167-L193","documentation":"Error \"Attempt to set data attribute of a content object when the body attributes was already set.\" thrown in hpyhacking/peatio.","triggerScenarios":"Thrown at app/assets/javascripts/swagger-ui/lib/shred/content.js:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set either the data attributes or the body 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"}