improve error handling

This commit is contained in:
Isaac 2022-10-10 12:49:34 +01:00
parent e813dee884
commit 35ad490ba6
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -100,8 +100,9 @@ module.exports = class extends Listener {
client.log.success('Posted client stats'); client.log.success('Posted client stats');
client.log.verbose(stats); client.log.verbose(stats);
client.log.debug(res); client.log.debug(res);
} catch (error) { } catch (res) {
client.log.error('An error occurred whilst posting stats', stats, error); client.log.error('An error occurred whilst posting stats', (await res.json())?.error);
client.log.debug(res);
} }
}; };
send(); send();