Skip to content

Commit b15bc25

Browse files
committed
feat: warn swift
1 parent e6850c6 commit b15bc25

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/swift/Sources/Client.swift.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,13 @@ open class Client {
321321
timeout: .seconds(30)
322322
)
323323

324+
let warnings = response.headers["x-{{ spec.title | lower }}-warning"].first
325+
if warnings != nil {
326+
warnings!.split(separator: ";").forEach { warning in
327+
print("Warning: \(warning)")
328+
}
329+
}
330+
324331
switch response.status.code {
325332
case 0..<400:
326333
switch T.self {

0 commit comments

Comments
 (0)