hpyhacking/peatio · error
Attempt to set body attribute of a content object when the d
Error message
Attempt to set body attribute of a content object when the data attributes was already set.
What it means
Error "Attempt to set body attribute of a content object when the data attributes was already set." thrown in hpyhacking/peatio.
Source
Thrown at app/assets/javascripts/swagger-ui/lib/shred/content.js:189
},
stringify: function(data) {
return JSON.stringify(data); }});
var qs = require('querystring');
// Register the post processor, which is used for JSON-based media types.
Content.registerProcessor(
["application/x-www-form-urlencoded"],
{ parser : qs.parse, stringify : qs.stringify });
// Error functions are defined separately here in an attempt to make the code
// easier to read.
var Errors = {
setDataWithBody: function(object) {
throw new Error("Attempt to set data attribute of a content object " +
"when the body attributes was already set.");
},
setBodyWithData: function(object) {
throw new Error("Attempt to set body attribute of a content object " +
"when the data attributes was already set.");
}
}
module.exports = Content;View on GitHub (pinned to dab8641137)
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.
When it happens
Trigger: Thrown at app/assets/javascripts/swagger-ui/lib/shred/content.js:189 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hpyhacking/peatio@dab8641137 (2026-08-23).
Data as JSON: /api/errors/02aab73b66b84c1e.
Report an issue: GitHub.