File tree Expand file tree Collapse file tree 9 files changed +11
-14
lines changed
android/library/src/main/java/io/package
kotlin/src/main/kotlin/io/appwrite Expand file tree Collapse file tree 9 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ class Client @JvmOverloads constructor(
477
477
val warnings = response.headers["x-{{ spec .title | lower }}-warning"]
478
478
if (warnings != null) {
479
479
warnings.split(";").forEach { warning ->
480
- System.out. println("Warning: $warning")
480
+ println("Warning: $warning")
481
481
}
482
482
}
483
483
Original file line number Diff line number Diff line change @@ -278,14 +278,12 @@ open class Client {
278
278
timeout: .seconds(30)
279
279
)
280
280
281
- let warnings = response.headers["x-{{ spec .title | lower }}-warning"].first
282
- if warnings != nil {
283
- warnings!.split(separator: ";").forEach { warning in
281
+ if let warning = response.headers["x-{{ spec .title | lower }}-warning"].first {
282
+ warning.split(separator: ";").forEach { warning in
284
283
print("Warning: \(warning)")
285
284
}
286
285
}
287
286
288
-
289
287
switch response.status.code {
290
288
case 0..<400:
291
289
if response .headers [" Set-Cookie" ].count > 0 {
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class Client {
99
99
100
100
const warnings = response.headers.get('x-{{ spec .title | lower }}-warning');
101
101
if (warnings) {
102
- warnings.split(';').forEach((warning: string) => console.warn(warning));
102
+ warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning));
103
103
}
104
104
} catch (error) {
105
105
throw new {{spec .title | caseUcfirst }}Exception(error.message);
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ class Client @JvmOverloads constructor(
527
527
val warnings = response.headers["x-{{ spec .title | lower }}-warning"]
528
528
if (warnings != null) {
529
529
warnings.split(";").forEach { warning ->
530
- System.out. println("Warning: $warning")
530
+ println("Warning: $warning")
531
531
}
532
532
}
533
533
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ class Client {
264
264
265
265
const warnings = response.headers.get('x-{{ spec .title | lower }}-warning');
266
266
if (warnings) {
267
- warnings.split(';').forEach((warning: string) => console.warn(warning));
267
+ warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning));
268
268
}
269
269
270
270
if (response.headers.get('content-type')?.includes('application/json')) {
Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ class Client {
392
392
393
393
const warnings = response.headers.get('x-{{ spec .title | lower }}-warning');
394
394
if (warnings) {
395
- warnings.split(';').forEach((warning: string) => console.warn(warning));
395
+ warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning));
396
396
}
397
397
398
398
if (response.headers.get('content-type')?.includes('application/json')) {
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ module {{ spec.title | caseUcfirst }}
229
229
warnings = response['x-{{ spec .title | lower }}-warning']
230
230
if warnings
231
231
warnings.split(';').each do |warning|
232
- warn warning
232
+ warn "Warning: #{ warning}"
233
233
end
234
234
end
235
235
Original file line number Diff line number Diff line change @@ -321,9 +321,8 @@ open class Client {
321
321
timeout: .seconds(30)
322
322
)
323
323
324
- let warnings = response.headers["x-{{ spec .title | lower }}-warning"].first
325
- if warnings != nil {
326
- warnings!.split(separator: ";").forEach { warning in
324
+ if let warning = response.headers["x-{{ spec .title | lower }}-warning"].first {
325
+ warning.split(separator: ";").forEach { warning in
327
326
print("Warning: \(warning)")
328
327
}
329
328
}
Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ class Client {
392
392
393
393
const warnings = response.headers.get('x-{{ spec .title | lower }}-warning');
394
394
if (warnings) {
395
- warnings.split(';').forEach((warning: string) => console.warn(warning));
395
+ warnings.split(';').forEach((warning: string) => console.warn('Warning: ' + warning));
396
396
}
397
397
398
398
if (response.headers.get('content-type')?.includes('application/json')) {
You can’t perform that action at this time.
0 commit comments