Skip to content

Commit 0bb6ef4

Browse files
committed
feat: deno warnings
1 parent 1d09f9d commit 0bb6ef4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

templates/deno/src/client.ts.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ export class Client {
9696
headers,
9797
body
9898
});
99+
100+
const warnings = response.headers.get('x-{{spec.title | lower}}-warning');
101+
if (warnings) {
102+
warnings.split(';').forEach((warning: string) => console.warn(warning));
103+
}
99104
} catch (error) {
100105
throw new {{spec.title | caseUcfirst}}Exception(error.message);
101106
}

0 commit comments

Comments
 (0)