-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add specific "paid plan required" error message (#93)
* Add specific error handling for the HTTP 403 error case, which indicate the user is authorized but needs a paid plan. * follow line length limit * ..
- Loading branch information
Showing
3 changed files
with
57 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,16 +538,25 @@ def _upload_terminated(self): | |
self._map_title) | ||
) | ||
|
||
error_message = \ | ||
self.tr('There was an error uploading this file, please ' | ||
'contact <a href="mailto:[email protected]">' | ||
'[email protected]</a> ' | ||
'for help fixing the issue') | ||
|
||
if self.map_uploader_task.error_string: | ||
error_message += '<p><b>{}</b></p>'.format( | ||
self.map_uploader_task.error_string | ||
if self.map_uploader_task.paid_plan_error: | ||
error_message = self.tr( | ||
'Uploading files to Felt requires a paid plan, ' | ||
'please visit ' | ||
'<a href=\'https://felt.com/pricing\'>felt.com/pricing</a>' | ||
' or contact <a href=\'mailto:[email protected]\'>' | ||
'[email protected]</a>.' | ||
) | ||
else: | ||
error_message = \ | ||
self.tr('There was an error uploading this file, please ' | ||
'contact <a href="mailto:[email protected]">' | ||
'[email protected]</a> ' | ||
'for help fixing the issue') | ||
|
||
if self.map_uploader_task.error_string: | ||
error_message += '<p><b>{}</b></p>'.format( | ||
self.map_uploader_task.error_string | ||
) | ||
|
||
self.progress_label.setText( | ||
GuiUtils.set_link_color( | ||
|