Skip to content

Commit 550a25a

Browse files
committed
feat: cli warnings
1 parent 0bb6ef4 commit 550a25a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/cli/lib/client.js.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ class Client {
132132
},
133133
}),
134134
});
135+
136+
const warnings = response.headers.get('x-{{spec.title | lower}}-warning');
137+
if (warnings) {
138+
warnings.split(';').forEach((warning: string) => console.warn(warning));
139+
}
135140
} catch (error) {
136141
throw new {{spec.title | caseUcfirst}}Exception(error.message);
137142
}

0 commit comments

Comments
 (0)