forked from qt-creator/qt-creator
Tweak error handling a bit
Always get http headers of the response to be able to handle issues more explicitly. These headers also contain additional information we will need later on. Change-Id: I062e97726a473c16b29cd84be0aa37260bac4ed8 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -112,13 +112,9 @@ void AxivionProjectSettingsWidget::fetchProjects()
|
||||
void AxivionProjectSettingsWidget::onDashboardInfoReceived(const DashboardInfo &info)
|
||||
{
|
||||
if (!info.error.isEmpty()) {
|
||||
if (info.error.contains("credentials")) {
|
||||
m_infoLabel->setText("Authentication failed. Check credentials settings.");
|
||||
m_infoLabel->setType(Utils::InfoLabel::Error);
|
||||
m_infoLabel->setVisible(true);
|
||||
}
|
||||
// send error to general message and discard results
|
||||
// FIXME currently we do not get all errors - e.g. wrong curl calls
|
||||
m_infoLabel->setText(info.error);
|
||||
m_infoLabel->setType(Utils::InfoLabel::Error);
|
||||
m_infoLabel->setVisible(true);
|
||||
updateEnabledStates();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user