Skip to content

Commit

Permalink
refractor: manual error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry23011 committed Jan 25, 2024
1 parent 0a43a63 commit b0103ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Easydict/Feature/Service/Gemini/GeminiService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ public final class GeminiService: QueryService {
result.translatedResults = [resultString]
completion(result, nil)
} catch {
print(error.localizedDescription)
completion(result, error)
let ezError = EZError(type: .API, description: nil, errorDataMessage: String(describing: error))
completion(result, ezError)
}
}
}
Expand Down

0 comments on commit b0103ba

Please sign in to comment.