You can do `defer.resolve(data)`, then place the entire `try/catch` block into its own `then`, probably be a bit cleaner.