From 49e57c2e7d6473daaa407597dd4d50c8c0d1fa43 Mon Sep 17 00:00:00 2001 From: Ifedapo Olarewaju Date: Sat, 29 Jun 2019 11:35:05 +0100 Subject: [PATCH] companion: display truer error during oauth failure --- packages/@uppy/companion/src/uppy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/companion/src/uppy.js b/packages/@uppy/companion/src/uppy.js index 2cebd6c38..5a0003263 100644 --- a/packages/@uppy/companion/src/uppy.js +++ b/packages/@uppy/companion/src/uppy.js @@ -186,9 +186,10 @@ const interceptGrantErrorResponse = interceptor((req, res) => { const unwantedBody = 'error=Grant%3A%20missing%20session%20or%20misconfigured%20provider' if (body === unwantedBody) { logger.error(`grant.js responded with error: ${body}`, 'grant.oauth.error') + res.set('Content-Type', 'text/plain') send([ 'Companion was unable to complete the OAuth process :(', - '(Hint, try clearing your cookies and try again)' + 'Error: User session is missing or the Provider was misconfigured' ].join('\n')) } else { send(body)