Skip to content

Commit dcb136b

Browse files
committed
update status code
1 parent f0dd54e commit dcb136b

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Package.resolved

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
"location" : "https://github.com/The-Igor/async-http-client.git",
77
"state" : {
88
"branch" : "main",
9-
"revision" : "92576110f6f4cd76a5971d9fffdb7cb9d0c6b105"
9+
"revision" : "156bb8d3d5bfa6d983060b95c4d0a1d10de29e4b"
10+
}
11+
},
12+
{
13+
"identity" : "retry-policy-service",
14+
"kind" : "remoteSourceControl",
15+
"location" : "https://github.com/The-Igor/retry-policy-service.git",
16+
"state" : {
17+
"revision" : "46ded002161a95c6b08ddd02c3f319891c773d14",
18+
"version" : "1.0.0"
1019
}
1120
}
1221
],

Sources/openai-async-image-swiftui/enum/AsyncImageErrors.swift

-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ enum AsyncImageErrors: Error, Equatable{
2020
/// response returned no images
2121
case returnedNoImages
2222

23-
/// Status is not 200
24-
case status(Int)
25-
2623
}

Sources/openai-async-image-swiftui/viewModel/OpenAIDefaultLoader.swift

-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ public final class OpenAIDefaultLoader : IOpenAILoader{
5959

6060
let result: Http.Response<Output> = try await client.post(path: path, body: body, headers: headers)
6161

62-
if let status = result.statusCode, status != 200 {
63-
throw AsyncImageErrors.status(status)
64-
}
65-
6662
return try imageBase64(from: result.value)
6763
}
6864

0 commit comments

Comments
 (0)