mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +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:
|
case 429:
|
||||||
// this shouldn't usually happen, but occasionally does
|
// this shouldn't usually happen, but occasionally does
|
||||||
// forcing error so it's not cached
|
// forcing error so it's not cached
|
||||||
error = error || "TooManyRequestsException";
|
error = error || new Error("TooManyRequestsException");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!error) {
|
if (!error) {
|
||||||
|
|||||||
@ -1013,7 +1013,7 @@ describe("Crafatar", function() {
|
|||||||
it("uuid should be rate limited", function(done) {
|
it("uuid should be rate limited", function(done) {
|
||||||
networking.get_profile(rid, id, function() {
|
networking.get_profile(rid, id, function() {
|
||||||
networking.get_profile(rid, id, function(err, profile) {
|
networking.get_profile(rid, id, function(err, profile) {
|
||||||
assert.strictEqual(err, "TooManyRequestsException");
|
assert.strictEqual(err.message, "TooManyRequestsException");
|
||||||
assert.strictEqual(profile.error, "TooManyRequestsException");
|
assert.strictEqual(profile.error, "TooManyRequestsException");
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user