Skip to content

Commit

Permalink
fix: handle promises
Browse files Browse the repository at this point in the history
Signed-off-by: Naseem <naseem@transit.app>
  • Loading branch information
Naseem committed Dec 24, 2020
1 parent a3829cf commit a4f47c4
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ export class PrometheusExporter implements MetricExporter {
).replace(/^([^/])/, '/$1');

if (config.preventServerStart !== true) {
this.startServer()
.then(callback)
.catch(err => {
throw err;
});
this.startServer().then(callback, err => {
return err;
});
} else if (callback) {
callback();
}
Expand Down
Loading

0 comments on commit a4f47c4

Please sign in to comment.