Skip to content

Commit

Permalink
Remove headers from response error (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler authored Jul 6, 2024
1 parent b037442 commit 50f887f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions Sources/Hummingbird/Error/EditedHTTPError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ struct EditedHTTPError: HTTPResponseError {
(self.originalError as? HTTPResponseError)?.status ?? .internalServerError
}

var headers: HTTPFields {
var headers = (originalError as? HTTPResponseError)?.headers ?? [:]
headers.append(contentsOf: self.additionalHeaders)
return headers
}

let additionalHeaders: HTTPFields

init(originalError: Error, additionalHeaders: HTTPFields) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ import NIOCore
public protocol HTTPResponseError: Error, ResponseGenerator {
/// status code for the error
var status: HTTPResponse.Status { get }
/// any addiitional headers required
var headers: HTTPFields { get }
}

0 comments on commit 50f887f

Please sign in to comment.