-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from WeTransfer/feature/improved-error-logging
Improve error logs for GitBuddy GitHub API failures
- Loading branch information
Showing
7 changed files
with
36 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Created by Antoine van der Lee on 20/10/2022. | ||
// Copyright © 2022 WeTransfer. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Ensures rich details become available when GitBuddy fails due to a failing GitHub API request. | ||
struct OctoKitError: LocalizedError { | ||
|
||
let statusCode: Int | ||
let underlyingError: Error | ||
let errorDetails: String | ||
|
||
var errorDescription: String? { | ||
""" | ||
GitHub API Request failed (StatusCode: \(statusCode)): \(errorDetails) | ||
Underlying error: | ||
\(underlyingError) | ||
""" | ||
} | ||
|
||
init(error: Error) { | ||
underlyingError = error | ||
statusCode = error._code | ||
errorDetails = (error as NSError).userInfo.debugDescription | ||
} | ||
} |
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
Submodule WeTransfer-iOS-CI
updated
11 files
+31 −1 | .gitignore | |
+9 −0 | Bitrise/tag_releasing_bitrise.yml | |
+67 −1 | Bitrise/testing_bitrise.yml | |
+1 −1 | BuildTools/swiftformat.sh | |
+5 −180 | Fastlane/Fastfile | |
+112 −90 | Fastlane/deployment_lanes.rb | |
+96 −22 | Fastlane/shared_lanes.rb | |
+182 −0 | Fastlane/testing_lanes.rb | |
+22 −0 | WeTransferPRLinter/Sources/WeTransferPRLinter/WeTransferPRLinter.swift | |
+13 −0 | WeTransferPRLinter/Tests/WeTransferPRLinterTests/WeTransferLinterTests.swift | |
+2 −2 | bitrise.yml |
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