Skip to content

Commit 6553fa4

Browse files
committed
don't log if we want json
1 parent 2a76129 commit 6553fa4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/job.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function run(instance, job_id, request_doc, asJson) {
6565
// this must be a support user, so we need to re-run with normal job parameters form
6666
if (job_id === 'sfcc-site-archive-import' && request_doc.file_name
6767
&& res.body.fault && res.body.fault.type === 'UnknownPropertyException') {
68-
console.warn("internal users must use different form for import; re-running job", request_doc)
68+
if (!asJson) {
69+
console.warn("internal users must use different form for import; re-running job", request_doc)
70+
}
6971

7072
return run(instance, job_id, {
7173
parameters: [
@@ -183,7 +185,9 @@ function runSync(instance, job_id, request_doc, asJson, failFast) {
183185
// this must be a support user, so we need to re-run with normal job parameters form
184186
if (job_id === 'sfcc-site-archive-import' && request_doc.file_name
185187
&& res.body.fault && res.body.fault.type === 'UnknownPropertyException') {
186-
console.warn("internal users must use different form for import; re-running job", request_doc)
188+
if (!asJson) {
189+
console.warn("internal users must use different form for import; re-running job", request_doc)
190+
}
187191

188192
return runSync(instance, job_id, {
189193
parameters: [

0 commit comments

Comments
 (0)