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

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 4 deletions
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)