logs: use %o to format error

otherwise, they are printed as multi-line and this messes up tail+date formatting
This commit is contained in:
Girish Ramakrishnan
2023-04-16 10:49:59 +02:00
parent e6f870b220
commit c4f4f3e914
29 changed files with 70 additions and 73 deletions
+1 -4
View File
@@ -54,10 +54,7 @@ async function getZoneByName(domainConfig, zoneName) {
if (error && error.reason === 'No such domain') throw new BoxError(BoxError.NOT_FOUND, error.message);
if (error && error.code === 403) throw new BoxError(BoxError.ACCESS_DENIED, error.message);
if (error && error.code === 404) throw new BoxError(BoxError.NOT_FOUND, error.message);
if (error) {
debug('gcdns.getZones', error);
throw new BoxError(BoxError.EXTERNAL_ERROR, error);
}
if (error) throw new BoxError(BoxError.EXTERNAL_ERROR, error);
const zone = result[0].filter(function (zone) {
return zone.metadata.dnsName.slice(0, -1) === zoneName; // the zone name contains a '.' at the end