| 1350 | 1350 | /** |
| 1351 | 1351 | * Checks if the response contains a quota error and displays a popup if it does. |
| 1352 | 1352 | * @param data |
| 1353 | 1353 | * @returns {Promise<void>} |
| 1354 | 1354 | * @throws {object} - response JSON |
| 1355 | 1355 | */ |
| 1356 | 1356 | async function checkQuotaError(data) { |
| 1357 | | - const errorText = await renderTemplateAsync('quotaError'); |
| 1358 | | - |
| 1359 | 1357 | if (!data) { |
| 1360 | 1358 | return; |
| 1361 | 1359 | } |
| 1362 | 1360 | |
| 1363 | 1361 | if (data.quota_error) { |
| 1364 | | - callPopup(errorText, 'text'); |
| 1362 | + renderTemplateAsync('quotaError').then((html) => Popup.show.text('Quota Error', html)); |
| 1365 | 1363 | |
| 1366 | 1364 | // this does not throw correctly (equiv to Error("[object Object]")) |
| 1367 | 1365 | // if trying to fix "[object Object]" displayed to users, start here |