diff --git a/web/ui/src/YBFeed/YBFeedConnector.ts b/web/ui/src/YBFeed/YBFeedConnector.ts index e6e7aab..d409df2 100644 --- a/web/ui/src/YBFeed/YBFeedConnector.ts +++ b/web/ui/src/YBFeed/YBFeedConnector.ts @@ -32,17 +32,19 @@ export class YBFeedConnector { reject(new YBFeedError(f.status, text)) }) } - f.json() - .then(j => { - j.vapidpublickey = f.headers.get("Ybfeed-Vapidpublickey") - for (let i=0;i { - reject(new YBFeedError(e.status, "Server Error")) - }) + else { + f.json() + .then(j => { + j.vapidpublickey = f.headers.get("Ybfeed-Vapidpublickey") + for (let i=0;i { + reject(new YBFeedError(e.status, "Server Error: " + e.message)) + }) + } }) .catch((e) => { reject(new YBFeedError(e.status, "Server Unavailable"))