Skip to content

Commit

Permalink
fix: qualify try_value_to (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz authored Feb 28, 2024
1 parent a34dd51 commit 12f831e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void fail(beast::error_code ec, char const *what)
template <class T>
std::optional<T> parsePayload(const boost::json::value &jv)
{
auto result = try_value_to<T>(jv);
auto result = boost::json::try_value_to<T>(jv);
if (!result.has_value())
{
fail(result.error(), "parsing payload");
Expand Down Expand Up @@ -218,7 +218,8 @@ boost::json::error_code handleMessage(std::unique_ptr<Listener> &listener,
"Payload root must contain a metadata field"};
return boost::system::error_code{129, errorRootMustContainMetadata};
}
auto metadataResult = try_value_to<messages::Metadata>(*metadataV);
auto metadataResult =
boost::json::try_value_to<messages::Metadata>(*metadataV);
if (metadataResult.has_error())
{
// TODO: wrap error?
Expand Down

0 comments on commit 12f831e

Please sign in to comment.