mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
fix(quickschedule): properly handle errors from QuickSchedule server
This commit is contained in:
parent
067a12dc17
commit
77cf91f292
|
@ -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