flames
flames copied to clipboard
Reduce list size payload
On https://github.com/mgwidmann/slack_coder the payload size can get quite large when a large number of incidents happen. i.e. almost 5000 times a foreign key constraint failed, in addition to about 20 total error objects it produced 8.9MB of JSON returned from the API. Using the inspector, Chrome was having trouble parsing the response body 😄 in the network tab.
To reduce the payload size, instead return just the first message plus the count of how many incidents there are.