Properly format matrix errors in spdlog statements

pull/509/head
Joseph Donofry 4 years ago
parent 387ba1a1e6
commit 87bf761dc2
No known key found for this signature in database
GPG Key ID: E8A1D78EF044B0CB
  1. 2
      src/Cache.cpp
  2. 8
      src/DeviceVerificationFlow.cpp
  3. 4
      src/ui/UserProfile.cpp

@ -3572,7 +3572,7 @@ Cache::query_keys(const std::string &user_id,
if (err) { if (err) {
nhlog::net()->warn( nhlog::net()->warn(
"failed to query device keys: {},{}", "failed to query device keys: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
cb({}, err); cb({}, err);
return; return;

@ -45,7 +45,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
user_id, [user_id, this](const UserKeyCache &res, mtx::http::RequestErr err) { user_id, [user_id, this](const UserKeyCache &res, mtx::http::RequestErr err) {
if (err) { if (err) {
nhlog::net()->warn("failed to query device keys: {},{}", nhlog::net()->warn("failed to query device keys: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
return; return;
} }
@ -64,7 +64,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
[this](const UserKeyCache &res, mtx::http::RequestErr err) { [this](const UserKeyCache &res, mtx::http::RequestErr err) {
if (err) { if (err) {
nhlog::net()->warn("failed to query device keys: {},{}", nhlog::net()->warn("failed to query device keys: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
return; return;
} }
@ -345,7 +345,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
if (err) { if (err) {
nhlog::net()->error( nhlog::net()->error(
"failed to upload signatures: {},{}", "failed to upload signatures: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
} }
@ -356,7 +356,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject *,
"id {}: {}, {}", "id {}: {}, {}",
user_id, user_id,
key_id, key_id,
e.errcode, mtx::errors::to_string(e.errcode),
e.error); e.error);
}); });
} }

@ -159,7 +159,7 @@ UserProfile::fetchDeviceList(const QString &userID)
mtx::http::RequestErr err) { mtx::http::RequestErr err) {
if (err) { if (err) {
nhlog::net()->warn("failed to query device keys: {},{}", nhlog::net()->warn("failed to query device keys: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
return; return;
} }
@ -174,7 +174,7 @@ UserProfile::fetchDeviceList(const QString &userID)
if (err) { if (err) {
nhlog::net()->warn("failed to query device keys: {},{}", nhlog::net()->warn("failed to query device keys: {},{}",
err->matrix_error.errcode, mtx::errors::to_string(err->matrix_error.errcode),
static_cast<int>(err->status_code)); static_cast<int>(err->status_code));
return; return;
} }

Loading…
Cancel
Save