mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
fix(quickschedule): properly handle errors from QuickSchedule server
This commit is contained in:
parent
f640ef4ee0
commit
d3572f3206
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ class AvailabilityComposerExtension extends ComposerExtension
|
|||
serverUrl = "https://quickschedule.herokuapp.com/register-events"
|
||||
post({url: serverUrl, body: JSON.stringify(data)})
|
||||
.then (args) =>
|
||||
if args[0].statusCode != 200
|
||||
throw new Error()
|
||||
data = args[1]
|
||||
return data
|
||||
.catch (error) ->
|
||||
|
|
Loading…
Reference in a new issue