mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-27 18:59:23 -06:00
flickr/slurp: Treat fail as an error (#2544)
Reject the promise when we get a fail status.
This commit is contained in:
@@ -156,7 +156,11 @@ function callFlickr(method: string, params: ?{[key: string]: string}) {
|
||||
if (err) {
|
||||
rej(err);
|
||||
} else {
|
||||
res(data);
|
||||
if (data.stat === 'fail') {
|
||||
rej(new Error(data.message));
|
||||
} else {
|
||||
res(data);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user