return HTTPERROR on 429 or 5xx, fixes #151

otherwise 429 or 5xx would be overwriting cached value with null for $config minutes
This commit is contained in:
jomo
2015-10-21 01:02:57 +02:00
parent d307aec221
commit fb0c70d648
4 changed files with 14 additions and 4 deletions

View File

@@ -1020,7 +1020,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.ifError(err);
assert.strictEqual(err.toString(), "HTTP: 429");
assert.strictEqual(profile, null);
done();
});