diff --git a/src/dns/digitalocean.js b/src/dns/digitalocean.js index 0d98b02cf..6d9ec09d3 100644 --- a/src/dns/digitalocean.js +++ b/src/dns/digitalocean.js @@ -23,7 +23,7 @@ const assert = require('assert'), const DIGITALOCEAN_ENDPOINT = 'https://api.digitalocean.com'; function formatError(response) { - return `DigitalOcean DNS error ${response.status} ${response.text}`; + return `DigitalOcean DNS error ${response.status} ${response.body ? response.body.message : response.text}`; } function removePrivateFields(domainObject) {