Skip to content

Commit b28871a

Browse files
committed
Fix error handler
1 parent 7c3d109 commit b28871a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ServiceComponent.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ class ServiceComponent {
4949

5050
auto response = ResponseFactory::createResponse(Status::CODE_500, error, m_objectMapper.get());
5151

52-
for(auto& pair : headers) {
52+
for(const auto& pair : headers.getAll()) {
5353
response->putHeader(pair.first, pair.second);
5454
}
5555

5656
return response;
57+
5758
}
5859

5960
};

0 commit comments

Comments
 (0)