Work in progress on subscriptions

This commit is contained in:
Tomas Bures 2017-12-10 21:44:35 +01:00
parent eecb3cd067
commit b22a87e712
18 changed files with 1729 additions and 884 deletions

View file

@ -87,6 +87,31 @@ class PermissionDeniedError extends InteroperableError {
}
}
class InvalidConfirmationForSubscriptionError extends InteroperableError {
constructor(msg, data) {
super('InvalidConfirmationForSubscriptionError', msg, data);
}
}
class InvalidConfirmationForAddressChangeError extends InteroperableError {
constructor(msg, data) {
super('InvalidConfirmationForAddressChangeError', msg, data);
}
}
class InvalidConfirmationForUnsubscriptionError extends InteroperableError {
constructor(msg, data) {
super('InvalidConfirmationForUnsubscriptionError', msg, data);
}
}
class SubscriptionNotAllowedError extends InteroperableError {
constructor(msg, data) {
super('SubscriptionNotAllowedError', msg, data);
this.status = 403;
}
}
const errorTypes = {
InteroperableError,
NotLoggedInError,
@ -101,7 +126,11 @@ const errorTypes = {
InvalidTokenError,
DependencyNotFoundError,
NamespaceNotFoundError,
PermissionDeniedError
PermissionDeniedError,
InvalidConfirmationForSubscriptionError,
InvalidConfirmationForAddressChangeError,
InvalidConfirmationForUnsubscriptionError,
SubscriptionNotAllowedError
};
function deserialize(errorObj) {