From 787694ea97e3620d8d578ed1efa945c9ab5b79e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Sz=C3=A1sz?= Date: Thu, 14 Mar 2024 12:33:37 +0100 Subject: [PATCH] Error message on too big recordings Catching HTTP error code 413 from nginx and displaying a proper error message. --- commands/share.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/share.js b/commands/share.js index f2d749e..6e198d4 100644 --- a/commands/share.js +++ b/commands/share.js @@ -198,6 +198,11 @@ function shareRecording(context) { return reject(body.errors.join('\n')); } + // Recording too large + if (response.statusCode == 413) { + return reject(new Error('Recording is too long to share.')); + } + // Invalid token if (response.statusCode == 401) { di.utility.removeToken();