Преглед на файлове

companion: display truer error during oauth failure

Ifedapo Olarewaju преди 5 години
родител
ревизия
49e57c2e7d
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      packages/@uppy/companion/src/uppy.js

+ 2 - 1
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)