updateContact gets 202 and not 200

This commit is contained in:
girish@cloudron.io
2016-01-13 16:46:01 -08:00
parent 3120eca721
commit 4e94c8ea56

View File

@@ -141,7 +141,7 @@ Acme.prototype.updateContact = function (registrationUri, callback) {
var that = this; var that = this;
this.sendSignedRequest(registrationUri, JSON.stringify(payload), function (error, result) { this.sendSignedRequest(registrationUri, JSON.stringify(payload), function (error, result) {
if (error) return callback(new AcmeError(AcmeError.EXTERNAL_ERROR, 'Network error when registering user: ' + error.message)); if (error) return callback(new AcmeError(AcmeError.EXTERNAL_ERROR, 'Network error when registering user: ' + error.message));
if (result.statusCode !== 200) return callback(new AcmeError(AcmeError.EXTERNAL_ERROR, util.format('Failed to update contact. Expecting 200, got %s %s', result.statusCode, result.text))); if (result.statusCode !== 202) return callback(new AcmeError(AcmeError.EXTERNAL_ERROR, util.format('Failed to update contact. Expecting 202, got %s %s', result.statusCode, result.text)));
debug('updateContact: contact of user updated to %s', that.email); debug('updateContact: contact of user updated to %s', that.email);