mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
don't throw strings
This commit is contained in:
parent
26f6b089ef
commit
9cdca6acda
@ -96,7 +96,7 @@ exp.get_from_options = function(rid, url, options, callback) {
|
||||
case 429:
|
||||
// this shouldn't usually happen, but occasionally does
|
||||
// forcing error so it's not cached
|
||||
error = error || "TooManyRequestsException";
|
||||
error = error || new Error("TooManyRequestsException");
|
||||
break;
|
||||
default:
|
||||
if (!error) {
|
||||
|
||||
@ -1013,7 +1013,7 @@ describe("Crafatar", function() {
|
||||
it("uuid should be rate limited", function(done) {
|
||||
networking.get_profile(rid, id, function() {
|
||||
networking.get_profile(rid, id, function(err, profile) {
|
||||
assert.strictEqual(err, "TooManyRequestsException");
|
||||
assert.strictEqual(err.message, "TooManyRequestsException");
|
||||
assert.strictEqual(profile.error, "TooManyRequestsException");
|
||||
done();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user