-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling for attachments (#244)
# Description This PR introduces a new error in the case that a user uploads a file that is too large, causing the remote connection to be closed on the API side. # License <!-- Your PR comment must contain the following line for us to merge the PR. --> I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
- Loading branch information
1 parent
f38cdaf
commit c9dd03c
Showing
4 changed files
with
61 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/nylas/models/NylasSdkRemoteClosedError.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.nylas.models | ||
|
||
/** | ||
* Error thrown when the Nylas API closes the connection before the Nylas SDK receives a response. | ||
* @param url The URL that timed out. | ||
* @param originalErrorMessage The error message from the library that closed the connection. | ||
*/ | ||
class NylasSdkRemoteClosedError( | ||
url: String, | ||
originalErrorMessage: String, | ||
) : AbstractNylasSdkError("Nylas API closed the connection before the Nylas SDK received a response.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters