Right now, when we're logging objects that conform to redactable we're doing this unwrap:
case .requestSuccess(_, _, let statusCode, _, let finalizedResult):
if let result = finalizedResult as? Redacted {
clog.info("Request completed with status code \(statusCode)", result)
} else {
clog.info("Request completed with status code \(statusCode). Finalized result redacted.")
}
The problem is that finalized result is actually Result<FinalResource, NetableError> and so this unwrap always fails. We need to unwrap the result before we do this.
Right now, when we're logging objects that conform to redactable we're doing this unwrap:
The problem is that finalized result is actually
Result<FinalResource, NetableError>
and so this unwrap always fails. We need to unwrap the result before we do this.