-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Closure-based reader-writer serde for JSON, FormURL (#696)
- Loading branch information
Showing
409 changed files
with
5,937 additions
and
10,578 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
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
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
29 changes: 29 additions & 0 deletions
29
Sources/ClientRuntime/Networking/BaseError/BaseError.swift
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,29 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
public protocol BaseError { | ||
var httpResponse: HttpResponse { get } | ||
var code: String { get } | ||
var message: String? { get } | ||
var requestID: String? { get } | ||
|
||
func customError() -> Error? | ||
} | ||
|
||
public extension BaseError { | ||
|
||
/// Returns a custom error from the error response, if any. | ||
/// | ||
/// By default, a `BaseError` returns no custom error unless | ||
/// the implementation provides its own implementation of this method. | ||
/// - Returns: Some custom `Error` or `nil` if none. | ||
func customError() -> Error? { nil } | ||
} | ||
|
||
public enum BaseErrorDecodeError: Error { | ||
case missingRequiredData | ||
} |
38 changes: 0 additions & 38 deletions
38
Sources/ClientRuntime/Networking/Http/HTTPResponseClosure.swift
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
Sources/ClientRuntime/Networking/Http/HTTPResponseDocumentBinding.swift
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
Sources/ClientRuntime/Networking/Http/HTTPResponseErrorClosure.swift
This file was deleted.
Oops, something went wrong.
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
13 changes: 0 additions & 13 deletions
13
Sources/ClientRuntime/Networking/Http/HttpResponseBinding.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.