Verified Commit a884837e authored by Huste, Tobias (FWCC) - 111645's avatar Huste, Tobias (FWCC) - 111645
Browse files

errors: add link to SSH public key in error message

parent 05c06d52
Pipeline #3459 failed with stage
in 12 minutes and 15 seconds
......@@ -83,3 +83,5 @@ UPLOADBYURL_EMAIL_BODY_FAILED = 'Your upload failed. Please make sure ' \
UPLOADBYURL_REMOTE_SERVERS = {}
"""Special configuration option for remote server."""
SERVER_NAME = "localhost"
......@@ -19,7 +19,7 @@
"""REST Errors for invenio-uploadbyurl."""
from flask import current_app
from flask import url_for
from invenio_rest.errors import RESTException
......@@ -103,7 +103,10 @@ class AuthenticationError(RESTException):
code = 400
description = 'SSH Authentication failed. Probably the SSH Key is ' \
'not added to the remote server. Try to add it manually or ' \
'contact the support.'
'contact the support. You can copy the SSH publick key ' \
'<a href=\"{}\">here</a>'.format(
url_for('invenio_uploadbyurl_settings.index')
)
class SSHException(RESTException):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment