Fix build error in API handler.

(cherry picked from commit 46e1839203)
This commit is contained in:
Alex Shvartzkop 2024-04-10 21:54:31 +03:00 committed by dsa-t
parent 3b66f64c19
commit cae631d7b7
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ protected:
HANDLER_RESULT<ResponseType>( HandlerType::* aHandler )( RequestType&, HANDLER_RESULT<ResponseType>( HandlerType::* aHandler )( RequestType&,
const HANDLER_CONTEXT& ) ) const HANDLER_CONTEXT& ) )
{ {
std::string typeName = RequestType().GetFriendlyName(); std::string typeName = RequestType().GetTypeName();
wxASSERT_MSG( !m_handlers.count( typeName ), wxASSERT_MSG( !m_handlers.count( typeName ),
wxString::Format( "Duplicate API handler for type %s", typeName ) ); wxString::Format( "Duplicate API handler for type %s", typeName ) );
@ -138,7 +138,7 @@ private:
if( !aRequest.message().UnpackTo( &aDest ) ) if( !aRequest.message().UnpackTo( &aDest ) )
{ {
std::string msg = fmt::format( "could not unpack message of type {} from request", std::string msg = fmt::format( "could not unpack message of type {} from request",
aDest.GetFriendlyName() ); aDest.GetTypeName() );
aReply.mutable_status()->set_status( ApiStatusCode::AS_BAD_REQUEST ); aReply.mutable_status()->set_status( ApiStatusCode::AS_BAD_REQUEST );
aReply.mutable_status()->set_error_message( msg ); aReply.mutable_status()->set_error_message( msg );
return false; return false;