-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Upload Request Timeout, Fix API Error Messages #230
Conversation
Generated by 🚫 Danger Swift against 832ecb5 |
… instead of an async throw stream. Update affected code
# Conflicts: # Sources/SmileID/Classes/Util.swift
@@ -3,5 +3,5 @@ import Foundation | |||
protocol RestServiceClient { | |||
func send<T: Decodable>(request: RestRequest) async throws -> T | |||
func multipart<T: Decodable>(request: RestRequest) async throws -> T | |||
func upload(request: RestRequest) async throws -> AsyncThrowingStream<UploadResponse, Error> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe document this as well?
do { | ||
let urlRequest = try request.getUploadRequest() | ||
let configuration = URLSessionConfiguration.default | ||
configuration.timeoutIntervalForRequest = uploadRequestTimeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobitech on android this applies to all requests not just the upload, not sure if I missed the discussion but could there be a reason why we're only usingthe timeout on the upload only?
…tworking layer. Add some documentation.
Story: https://app.shortcut.com/smileid/story/13466/
Summary
Known Issues
Confirm that timeout errors are handled.
Test Instructions
uploadRequestTimeout
argument to the SmileID initialiser like 1sec.Screenshot
https://portal.usesmileid.com/admin/job/production/172668761