File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
swift-bedrock-library/Sources/BedrockService Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ public struct BedrockService: Sendable {
151151 return BedrockRuntimeClient( config: config)
152152 }
153153
154- func handleCommonError( _ error: Error, context: String) throws {
154+ func handleCommonError( _ error: Error, context: String) throws -> Never {
155155 if let commonError = error as? CommonRunTimeError {
156156 logger. trace ( " CommonRunTimeError while \( context) " , metadata: [ " error " : " \( error) " ] )
157157 switch commonError {
@@ -208,7 +208,6 @@ public struct BedrockService: Sendable {
208208 return modelsInfo
209209 } catch {
210210 try handleCommonError ( error, context: " listing foundation models " )
211- throw BedrockServiceError . unknownError ( " \( error) " ) // FIXME: handleCommonError will always throw
212211 }
213212 }
214213}
Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ extension BedrockService {
134134
135135 } catch {
136136 try handleCommonError ( error, context: " invoking converse stream " )
137- throw BedrockServiceError . unknownError ( " \( error) " ) // FIXME: handleCommonError will always throw
138137 }
139138 }
140139
You can’t perform that action at this time.
0 commit comments