@remit/data-ports 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/errors.ts +24 -0
package/package.json
CHANGED
package/src/errors.ts
CHANGED
|
@@ -98,6 +98,30 @@ export class MailboxNotSettledError extends ConflictError {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Why the row's folder and uid do not name the same message. `in_flight` clears
|
|
103
|
+
* on its own, so the client words a wait; `unverified` does not, so it words a
|
|
104
|
+
* resync instead.
|
|
105
|
+
*/
|
|
106
|
+
export type MessagePlacementUnsettledReason = "in_flight" | "unverified";
|
|
107
|
+
|
|
108
|
+
export class MessagePlacementUnsettledError extends ConflictError {
|
|
109
|
+
name = "MessagePlacementUnsettledError";
|
|
110
|
+
|
|
111
|
+
constructor(
|
|
112
|
+
message: string,
|
|
113
|
+
accountId: string,
|
|
114
|
+
messageId: string,
|
|
115
|
+
reason: MessagePlacementUnsettledReason,
|
|
116
|
+
) {
|
|
117
|
+
super(message);
|
|
118
|
+
this.publicApiError = {
|
|
119
|
+
code: "message_placement_unsettled",
|
|
120
|
+
details: { accountId, messageId, reason },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
101
125
|
/**
|
|
102
126
|
* A message exists but its body could not be fetched/parsed after every
|
|
103
127
|
* body-sync retry was spent (issue #1270 / epic #1281 invariant 3). This is
|