Skip to main content

mssf_core/error/
errorcode.rs

1// ------------------------------------------------------------
2// Copyright (c) Microsoft Corporation.  All rights reserved.
3// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
4// ------------------------------------------------------------
5
6use crate::HRESULT;
7use mssf_com::FabricTypes::FABRIC_ERROR_CODE;
8
9// Common HRESULT codes that SF reuses from windows.
10const S_OK: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(windows_core::Win32::Foundation::S_OK.0);
11const E_ABORT: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_ABORT.0);
12const E_ACCESSDENIED: FABRIC_ERROR_CODE =
13    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_ACCESSDENIED.0);
14const E_FAIL: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_FAIL.0);
15const E_HANDLE: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_HANDLE.0);
16const E_INVALIDARG: FABRIC_ERROR_CODE =
17    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_INVALIDARG.0);
18const E_NOINTERFACE: FABRIC_ERROR_CODE =
19    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_NOINTERFACE.0);
20const E_NOTIMPL: FABRIC_ERROR_CODE =
21    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_NOTIMPL.0);
22const E_OUTOFMEMORY: FABRIC_ERROR_CODE =
23    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_OUTOFMEMORY.0);
24const E_POINTER: FABRIC_ERROR_CODE =
25    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_POINTER.0);
26const E_UNEXPECTED: FABRIC_ERROR_CODE =
27    FABRIC_ERROR_CODE(windows_core::Win32::Foundation::E_UNEXPECTED.0);
28
29// HRESULT codes from win32 errors that SF resuses.
30const E_FILE_EXISTS: FABRIC_ERROR_CODE =
31    FABRIC_ERROR_CODE(HRESULT::from_win32(windows_core::Win32::Foundation::ERROR_FILE_EXISTS.0).0);
32const E_DIR_NOT_EMPTY: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(
33    HRESULT::from_win32(windows_core::Win32::Foundation::ERROR_DIR_NOT_EMPTY.0).0,
34);
35const E_NOT_FOUND: FABRIC_ERROR_CODE =
36    FABRIC_ERROR_CODE(HRESULT::from_win32(windows_core::Win32::Foundation::ERROR_NOT_FOUND.0).0);
37
38// Internal error codes used by SF.
39// TODO: Add the complete list from dotnet and cpp code.
40const FABRIC_INTERNAL_E_CANNOT_CONNECT: FABRIC_ERROR_CODE = FABRIC_ERROR_CODE(0x80071CC0u32 as i32);
41
42/// Hepler macro to define fabric error code.
43/// SF uses win32 hresult code together with the custom fabric error code.
44/// This enum helps passing errors between Rust and SF API, and is easy to debug.
45/// code1 list are errors defined in this current file, lit is a dummy string literal,
46/// code list are fabric errors defined in FabricTypes.rs.
47/// The macro defines windows errors first, then followed by fabric errors.
48// Need to match cs impl:
49// https://github.com/microsoft/service-fabric/blob/19791eb97c8d876517daa030e5a403f4bcad25b1/src/prod/src/managed/Api/src/System/Fabric/Interop/NativeTypes.cs#L57
50macro_rules! define_fabric_error_code{
51    ($( $code1:ident ),* ,($lit:literal), $( $code:ident ),*) =>{
52        #[allow(non_camel_case_types)]
53        #[derive(Debug, Clone, PartialEq)]
54        #[repr(i32)]
55        pub enum ErrorCode {
56            // Define windows error codes for SF
57            $(
58                $code1 = $code1 .0,
59            )*
60
61            // defines SF error codes.
62            $(
63                $code = mssf_com::FabricTypes::$code .0,
64            )*
65        }
66
67        impl TryFrom<FABRIC_ERROR_CODE> for ErrorCode {
68            type Error = &'static str;
69
70            fn try_from(value: FABRIC_ERROR_CODE) -> Result<Self, Self::Error> {
71                match value {
72                    $(
73                        $code1 => Ok(Self::$code1),
74                    )*
75                    // SF code converts.
76                    $(
77                        mssf_com::FabricTypes::$code => Ok(Self::$code),
78                    )*
79                    _ => Err("Unknown FABRIC_ERROR_CODE")
80                }
81            }
82        }
83    }
84}
85
86impl From<ErrorCode> for crate::Error {
87    fn from(value: ErrorCode) -> Self {
88        crate::Error::from_hresult(HRESULT(value as i32))
89    }
90}
91
92// other conversions goes through crate::Error
93impl From<ErrorCode> for HRESULT {
94    fn from(value: ErrorCode) -> Self {
95        crate::Error::from(value).into()
96    }
97}
98
99impl From<ErrorCode> for crate::WinError {
100    fn from(value: ErrorCode) -> Self {
101        crate::Error::from(value).into()
102    }
103}
104
105impl core::fmt::Display for ErrorCode {
106    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
107        core::write!(f, "{self:?}") // use the debug string
108    }
109}
110
111impl ErrorCode {
112    /// Matches the FabricTransientException mapping in InteropExceptionMap.cs
113    pub fn is_transient(&self) -> bool {
114        matches!(
115            self,
116            crate::ErrorCode::FABRIC_E_SERVICE_OFFLINE
117                | crate::ErrorCode::FABRIC_E_APPLICATION_UPDATE_IN_PROGRESS
118                | crate::ErrorCode::FABRIC_E_RECONFIGURATION_PENDING
119                | crate::ErrorCode::FABRIC_E_NO_WRITE_QUORUM
120                | crate::ErrorCode::FABRIC_E_REPLICATION_QUEUE_FULL
121                | crate::ErrorCode::FABRIC_E_SERVICE_TOO_BUSY
122                | crate::ErrorCode::FABRIC_E_GATEWAY_NOT_REACHABLE
123                | crate::ErrorCode::E_ABORT // This is the same as OperationCanceled.
124                | crate::ErrorCode::FABRIC_E_ACQUIRE_FILE_LOCK_FAILED
125                | crate::ErrorCode::FABRIC_E_IMAGEBUILDER_TIMEOUT
126                | crate::ErrorCode::FABRIC_E_CONSTRAINT_KEY_UNDEFINED
127                | crate::ErrorCode::FABRIC_E_STOP_IN_PROGRESS
128                | crate::ErrorCode::FABRIC_E_DATABASE_MIGRATION_IN_PROGRESS
129        )
130    }
131}
132
133// This defines all the fabric error codes.
134// list copied from https://github.com/microsoft/service-fabric/blob/19791eb97c8d876517daa030e5a403f4bcad25b1/src/prod/src/idl/public/FabricTypes.idl#L60C18-L60C35
135define_fabric_error_code!(
136    S_OK,
137    E_ABORT,
138    E_ACCESSDENIED,
139    E_FAIL,
140    E_HANDLE,
141    E_INVALIDARG,
142    E_NOINTERFACE,
143    E_NOTIMPL,
144    E_OUTOFMEMORY,
145    E_POINTER,
146    E_UNEXPECTED,
147    E_FILE_EXISTS,
148    E_DIR_NOT_EMPTY,
149    E_NOT_FOUND,
150    // Internal errors
151    FABRIC_INTERNAL_E_CANNOT_CONNECT,
152    ("Literal for breaking up first error chunk and the fabric errors"),
153    FABRIC_E_COMMUNICATION_ERROR,
154    FABRIC_E_INVALID_ADDRESS,
155    FABRIC_E_INVALID_NAME_URI,
156    FABRIC_E_INVALID_PARTITION_KEY,
157    FABRIC_E_NAME_ALREADY_EXISTS,
158    FABRIC_E_NAME_DOES_NOT_EXIST,
159    FABRIC_E_NAME_NOT_EMPTY,
160    FABRIC_E_NODE_NOT_FOUND,
161    FABRIC_E_NODE_IS_UP,
162    FABRIC_E_NO_WRITE_QUORUM,
163    FABRIC_E_NOT_PRIMARY,
164    FABRIC_E_NOT_READY,
165    FABRIC_E_OPERATION_NOT_COMPLETE,
166    FABRIC_E_PROPERTY_DOES_NOT_EXIST,
167    FABRIC_E_RECONFIGURATION_PENDING,
168    FABRIC_E_REPLICATION_QUEUE_FULL,
169    FABRIC_E_SERVICE_ALREADY_EXISTS,
170    FABRIC_E_SERVICE_DOES_NOT_EXIST,
171    FABRIC_E_SERVICE_OFFLINE,
172    FABRIC_E_SERVICE_METADATA_MISMATCH,
173    FABRIC_E_SERVICE_AFFINITY_CHAIN_NOT_SUPPORTED,
174    FABRIC_E_SERVICE_TYPE_ALREADY_REGISTERED,
175    FABRIC_E_SERVICE_TYPE_NOT_REGISTERED,
176    FABRIC_E_VALUE_TOO_LARGE,
177    FABRIC_E_VALUE_EMPTY,
178    FABRIC_E_PROPERTY_CHECK_FAILED,
179    FABRIC_E_WRITE_CONFLICT,
180    FABRIC_E_ENUMERATION_COMPLETED,
181    FABRIC_E_APPLICATION_TYPE_PROVISION_IN_PROGRESS,
182    FABRIC_E_APPLICATION_TYPE_ALREADY_EXISTS,
183    FABRIC_E_APPLICATION_TYPE_NOT_FOUND,
184    FABRIC_E_APPLICATION_TYPE_IN_USE,
185    FABRIC_E_APPLICATION_ALREADY_EXISTS,
186    FABRIC_E_APPLICATION_NOT_FOUND,
187    FABRIC_E_APPLICATION_UPGRADE_IN_PROGRESS,
188    FABRIC_E_APPLICATION_UPGRADE_VALIDATION_ERROR,
189    FABRIC_E_SERVICE_TYPE_NOT_FOUND,
190    FABRIC_E_SERVICE_TYPE_MISMATCH,
191    FABRIC_E_SERVICE_TYPE_TEMPLATE_NOT_FOUND,
192    FABRIC_E_CONFIGURATION_SECTION_NOT_FOUND,
193    FABRIC_E_CONFIGURATION_PARAMETER_NOT_FOUND,
194    FABRIC_E_INVALID_CONFIGURATION,
195    FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR,
196    FABRIC_E_PARTITION_NOT_FOUND,
197    FABRIC_E_REPLICA_DOES_NOT_EXIST,
198    FABRIC_E_SERVICE_GROUP_ALREADY_EXISTS,
199    FABRIC_E_SERVICE_GROUP_DOES_NOT_EXIST,
200    FABRIC_E_PROCESS_DEACTIVATED,
201    FABRIC_E_PROCESS_ABORTED,
202    FABRIC_E_UPGRADE_FAILED,
203    FABRIC_E_INVALID_CREDENTIAL_TYPE,
204    FABRIC_E_INVALID_X509_FIND_TYPE,
205    FABRIC_E_INVALID_X509_STORE_LOCATION,
206    FABRIC_E_INVALID_X509_STORE_NAME,
207    FABRIC_E_INVALID_X509_THUMBPRINT,
208    FABRIC_E_INVALID_PROTECTION_LEVEL,
209    FABRIC_E_INVALID_X509_STORE,
210    FABRIC_E_INVALID_SUBJECT_NAME,
211    FABRIC_E_INVALID_ALLOWED_COMMON_NAME_LIST,
212    FABRIC_E_INVALID_CREDENTIALS,
213    FABRIC_E_DECRYPTION_FAILED,
214    FABRIC_E_CONFIGURATION_PACKAGE_NOT_FOUND,
215    FABRIC_E_DATA_PACKAGE_NOT_FOUND,
216    FABRIC_E_CODE_PACKAGE_NOT_FOUND,
217    FABRIC_E_SERVICE_ENDPOINT_RESOURCE_NOT_FOUND,
218    FABRIC_E_INVALID_OPERATION,
219    FABRIC_E_OBJECT_CLOSED,
220    FABRIC_E_TIMEOUT,
221    FABRIC_E_FILE_NOT_FOUND,
222    FABRIC_E_DIRECTORY_NOT_FOUND,
223    FABRIC_E_INVALID_DIRECTORY,
224    FABRIC_E_PATH_TOO_LONG,
225    FABRIC_E_IMAGESTORE_IOERROR,
226    FABRIC_E_CORRUPTED_IMAGE_STORE_OBJECT_FOUND,
227    FABRIC_E_APPLICATION_NOT_UPGRADING,
228    FABRIC_E_APPLICATION_ALREADY_IN_TARGET_VERSION,
229    FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR,
230    FABRIC_E_FABRIC_VERSION_NOT_FOUND,
231    FABRIC_E_FABRIC_VERSION_IN_USE,
232    FABRIC_E_FABRIC_VERSION_ALREADY_EXISTS,
233    FABRIC_E_FABRIC_ALREADY_IN_TARGET_VERSION,
234    FABRIC_E_FABRIC_NOT_UPGRADING,
235    FABRIC_E_FABRIC_UPGRADE_IN_PROGRESS,
236    FABRIC_E_FABRIC_UPGRADE_VALIDATION_ERROR,
237    FABRIC_E_HEALTH_MAX_REPORTS_REACHED,
238    FABRIC_E_HEALTH_STALE_REPORT,
239    FABRIC_E_KEY_TOO_LARGE,
240    FABRIC_E_KEY_NOT_FOUND,
241    FABRIC_E_SEQUENCE_NUMBER_CHECK_FAILED,
242    FABRIC_E_ENCRYPTION_FAILED,
243    FABRIC_E_INVALID_ATOMIC_GROUP,
244    FABRIC_E_HEALTH_ENTITY_NOT_FOUND,
245    FABRIC_E_SERVICE_MANIFEST_NOT_FOUND,
246    FABRIC_E_RELIABLE_SESSION_TRANSPORT_STARTUP_FAILURE,
247    FABRIC_E_RELIABLE_SESSION_ALREADY_EXISTS,
248    FABRIC_E_RELIABLE_SESSION_CANNOT_CONNECT,
249    FABRIC_E_RELIABLE_SESSION_MANAGER_EXISTS,
250    FABRIC_E_RELIABLE_SESSION_REJECTED,
251    FABRIC_E_RELIABLE_SESSION_MANAGER_ALREADY_LISTENING,
252    FABRIC_E_RELIABLE_SESSION_MANAGER_NOT_FOUND,
253    FABRIC_E_RELIABLE_SESSION_MANAGER_NOT_LISTENING,
254    FABRIC_E_INVALID_SERVICE_TYPE,
255    FABRIC_E_IMAGEBUILDER_TIMEOUT,
256    FABRIC_E_IMAGEBUILDER_ACCESS_DENIED,
257    FABRIC_E_IMAGEBUILDER_INVALID_MSI_FILE,
258    FABRIC_E_SERVICE_TOO_BUSY,
259    FABRIC_E_TRANSACTION_NOT_ACTIVE,
260    FABRIC_E_REPAIR_TASK_ALREADY_EXISTS,
261    FABRIC_E_REPAIR_TASK_NOT_FOUND,
262    FABRIC_E_RELIABLE_SESSION_NOT_FOUND,
263    FABRIC_E_RELIABLE_SESSION_QUEUE_EMPTY,
264    FABRIC_E_RELIABLE_SESSION_QUOTA_EXCEEDED,
265    FABRIC_E_RELIABLE_SESSION_SERVICE_FAULTED,
266    FABRIC_E_RELIABLE_SESSION_INVALID_TARGET_PARTITION,
267    FABRIC_E_TRANSACTION_TOO_LARGE,
268    FABRIC_E_REPLICATION_OPERATION_TOO_LARGE,
269    FABRIC_E_INSTANCE_ID_MISMATCH,
270    FABRIC_E_UPGRADE_DOMAIN_ALREADY_COMPLETED,
271    FABRIC_E_NODE_HAS_NOT_STOPPED_YET,
272    FABRIC_E_INSUFFICIENT_CLUSTER_CAPACITY,
273    FABRIC_E_INVALID_PACKAGE_SHARING_POLICY,
274    FABRIC_E_PREDEPLOYMENT_NOT_ALLOWED,
275    FABRIC_E_INVALID_BACKUP_SETTING,
276    FABRIC_E_MISSING_FULL_BACKUP,
277    FABRIC_E_BACKUP_IN_PROGRESS,
278    FABRIC_E_DUPLICATE_SERVICE_NOTIFICATION_FILTER_NAME,
279    FABRIC_E_INVALID_REPLICA_OPERATION,
280    FABRIC_E_INVALID_REPLICA_STATE,
281    FABRIC_E_LOADBALANCER_NOT_READY,
282    FABRIC_E_INVALID_PARTITION_OPERATION,
283    FABRIC_E_PRIMARY_ALREADY_EXISTS,
284    FABRIC_E_SECONDARY_ALREADY_EXISTS,
285    FABRIC_E_BACKUP_DIRECTORY_NOT_EMPTY,
286    FABRIC_E_FORCE_NOT_SUPPORTED_FOR_REPLICA_OPERATION,
287    FABRIC_E_ACQUIRE_FILE_LOCK_FAILED,
288    FABRIC_E_CONNECTION_DENIED,
289    FABRIC_E_SERVER_AUTHENTICATION_FAILED,
290    FABRIC_E_CONSTRAINT_KEY_UNDEFINED,
291    FABRIC_E_MULTITHREADED_TRANSACTIONS_NOT_ALLOWED,
292    FABRIC_E_INVALID_X509_NAME_LIST,
293    FABRIC_E_VERBOSE_FM_PLACEMENT_HEALTH_REPORTING_REQUIRED,
294    FABRIC_E_GATEWAY_NOT_REACHABLE,
295    FABRIC_E_USER_ROLE_CLIENT_CERTIFICATE_NOT_CONFIGURED,
296    FABRIC_E_TRANSACTION_ABORTED,
297    FABRIC_E_CANNOT_CONNECT,
298    FABRIC_E_MESSAGE_TOO_LARGE,
299    FABRIC_E_CONSTRAINT_NOT_SATISFIED,
300    FABRIC_E_ENDPOINT_NOT_FOUND,
301    FABRIC_E_APPLICATION_UPDATE_IN_PROGRESS,
302    FABRIC_E_DELETE_BACKUP_FILE_FAILED,
303    FABRIC_E_CONNECTION_CLOSED_BY_REMOTE_END,
304    FABRIC_E_INVALID_TEST_COMMAND_STATE,
305    FABRIC_E_TEST_COMMAND_OPERATION_ID_ALREADY_EXISTS,
306    FABRIC_E_CM_OPERATION_FAILED,
307    FABRIC_E_IMAGEBUILDER_RESERVED_DIRECTORY_ERROR,
308    FABRIC_E_CERTIFICATE_NOT_FOUND,
309    FABRIC_E_CHAOS_ALREADY_RUNNING,
310    FABRIC_E_FABRIC_DATA_ROOT_NOT_FOUND,
311    FABRIC_E_INVALID_RESTORE_DATA,
312    FABRIC_E_DUPLICATE_BACKUPS,
313    FABRIC_E_INVALID_BACKUP_CHAIN,
314    FABRIC_E_STOP_IN_PROGRESS,
315    FABRIC_E_ALREADY_STOPPED,
316    FABRIC_E_NODE_IS_DOWN,
317    FABRIC_E_NODE_TRANSITION_IN_PROGRESS,
318    FABRIC_E_INVALID_BACKUP,
319    FABRIC_E_INVALID_INSTANCE_ID,
320    FABRIC_E_INVALID_DURATION,
321    FABRIC_E_RESTORE_SAFE_CHECK_FAILED,
322    FABRIC_E_CONFIG_UPGRADE_FAILED,
323    FABRIC_E_UPLOAD_SESSION_RANGE_NOT_SATISFIABLE,
324    FABRIC_E_UPLOAD_SESSION_ID_CONFLICT,
325    FABRIC_E_INVALID_PARTITION_SELECTOR,
326    FABRIC_E_INVALID_REPLICA_SELECTOR,
327    FABRIC_E_DNS_SERVICE_NOT_FOUND,
328    FABRIC_E_INVALID_DNS_NAME,
329    FABRIC_E_DNS_NAME_IN_USE,
330    FABRIC_E_COMPOSE_DEPLOYMENT_ALREADY_EXISTS,
331    FABRIC_E_COMPOSE_DEPLOYMENT_NOT_FOUND,
332    FABRIC_E_INVALID_FOR_STATEFUL_SERVICES,
333    FABRIC_E_INVALID_FOR_STATELESS_SERVICES,
334    FABRIC_E_ONLY_VALID_FOR_STATEFUL_PERSISTENT_SERVICES,
335    FABRIC_E_INVALID_UPLOAD_SESSION_ID,
336    FABRIC_E_BACKUP_NOT_ENABLED,
337    FABRIC_E_BACKUP_IS_ENABLED,
338    FABRIC_E_BACKUP_POLICY_DOES_NOT_EXIST,
339    FABRIC_E_BACKUP_POLICY_ALREADY_EXISTS,
340    FABRIC_E_RESTORE_IN_PROGRESS,
341    FABRIC_E_RESTORE_SOURCE_TARGET_PARTITION_MISMATCH,
342    FABRIC_E_FAULT_ANALYSIS_SERVICE_NOT_ENABLED,
343    FABRIC_E_CONTAINER_NOT_FOUND,
344    FABRIC_E_OBJECT_DISPOSED,
345    FABRIC_E_NOT_READABLE,
346    FABRIC_E_BACKUPCOPIER_UNEXPECTED_ERROR,
347    FABRIC_E_BACKUPCOPIER_TIMEOUT,
348    FABRIC_E_BACKUPCOPIER_ACCESS_DENIED,
349    FABRIC_E_INVALID_SERVICE_SCALING_POLICY,
350    FABRIC_E_SINGLE_INSTANCE_APPLICATION_ALREADY_EXISTS,
351    FABRIC_E_SINGLE_INSTANCE_APPLICATION_NOT_FOUND,
352    FABRIC_E_VOLUME_ALREADY_EXISTS,
353    FABRIC_E_VOLUME_NOT_FOUND,
354    FABRIC_E_DATABASE_MIGRATION_IN_PROGRESS,
355    FABRIC_E_CENTRAL_SECRET_SERVICE_GENERIC,
356    FABRIC_E_SECRET_INVALID,
357    FABRIC_E_SECRET_VERSION_ALREADY_EXISTS,
358    FABRIC_E_SINGLE_INSTANCE_APPLICATION_UPGRADE_IN_PROGRESS,
359    FABRIC_E_OPERATION_NOT_SUPPORTED,
360    FABRIC_E_COMPOSE_DEPLOYMENT_NOT_UPGRADING,
361    FABRIC_E_SECRET_TYPE_CANNOT_BE_CHANGED,
362    FABRIC_E_NETWORK_NOT_FOUND,
363    FABRIC_E_NETWORK_IN_USE,
364    FABRIC_E_ENDPOINT_NOT_REFERENCED,
365    FABRIC_E_AUXILIARY_ALREADY_EXISTS,
366    FABRIC_E_AUXILIARY_FEATURE_DISABLED,
367    FABRIC_E_BACKUP_NOT_FOUND,
368    FABRIC_E_COPY_ABORTED,
369    FABRIC_E_DATABASE_FILES_CORRUPTED,
370    FABRIC_E_DISABLE_ENABLE_SERVICE_FEATURE_DISABLED,
371    FABRIC_E_INCOMPATIBLE_EXCLUSIVE_SELF_RECONFIGURING,
372    FABRIC_E_INSTANCE_ALREADY_EXISTS,
373    FABRIC_E_INSTANCE_COUNT_UPDATE_NOT_ALLOWED,
374    FABRIC_E_INSUFFICIENT_MAX_LOAD_CAPACITY,
375    FABRIC_E_MAX_ALLOWED_DISABLED_SERVICES_REACHED,
376    FABRIC_E_NODE_TYPE_NOT_FOUND,
377    FABRIC_E_RESTORE_WAITING_FOR_USER_INTERVENTION,
378    FABRIC_E_RUN_TO_COMPLETION_INCOMPATIBLE_WITH_SHARED_PROCESS,
379    FABRIC_E_SERVICE_ALREADY_IN_REQUESTED_STATE,
380    FABRIC_E_SERVICE_DISABLED,
381    FABRIC_E_SERVICE_DISABLE_IN_PROGRESS,
382    FABRIC_E_SKIP_RESTORE_OPERATION,
383    FABRIC_E_STORE_DISK_ERROR,
384    FABRIC_E_STORE_OUT_OF_INSTANCES,
385    FABRIC_E_STORE_OUT_OF_LONG_VALUE_IDS,
386    FABRIC_E_STORE_OUT_OF_SESSIONS,
387    FABRIC_E_STORE_SERIALIZATION_ERROR,
388    FABRIC_E_STORE_SERIALIZED_STREAM_NULL,
389    FABRIC_E_VERSION_STORE_OUT_OF_MEMORY
390);