Skip to content

Commit 42aadf8

Browse files
fix: Properly construct std::runtime_error with request.reason and add missing include
1 parent 212c9c6 commit 42aadf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/policy/impl.cppm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module;
2-
2+
#include <string>
33
#include <concepts>
44
#include <exception>
55
#include <expected>
@@ -266,7 +266,7 @@ struct error::handler<error::throwing, OpTag, CommonRep, ErrorPayload> {
266266
using result_type = std::expected<CommonRep, ErrorPayload>;
267267

268268
static auto resolve(request_type const &request) -> result_type {
269-
throw std::runtime_error(request.reason.data());
269+
throw std::runtime_error(std::string{request.reason});
270270
}
271271
};
272272

0 commit comments

Comments
 (0)