MSTableOperationError Class Reference

Inherits from NSObject
Declared in MSTableOperationError.h

Overview

The MSTableOperationError class represents an error that occurred while sending a a table operation (insert, etc) to the Windows Azure Mobile Service during a sync event (for example a Push) The most common causes of a table operation error are non success codes from the server such as a precondition failed response.

Properties

  guid

Unique error id in table store

@property (nonatomic, readonly) NSString *guid

Discussion

Unique error id in table store

Declared In

MSTableOperationError.h

  table

The name of the table the operation was being performed for

@property (nonatomic, readonly, copy) NSString *table

Discussion

The name of the table the operation was being performed for

Declared In

MSTableOperationError.h

  operation

The type of operation being performed on the table (insert, update, delete)

@property (nonatomic, readonly) MSTableOperationTypes operation

Discussion

The type of operation being performed on the table (insert, update, delete)

Declared In

MSTableOperationError.h

  itemId

The id of the item to the operation ran for

@property (nonatomic, readonly, copy) NSString *itemId

Discussion

The id of the item to the operation ran for

Declared In

MSTableOperationError.h

  item

The full item being sent to the server, this item may not always be present for all operations

@property (nonatomic, readonly, copy) NSDictionary *item

Discussion

The full item being sent to the server, this item may not always be present for all operations

Declared In

MSTableOperationError.h

  code

Represents the error code recieved while executing the table operation, see MSError for a list of Mobile Service’s error codes

@property (nonatomic, readonly) NSInteger code

Discussion

Represents the error code recieved while executing the table operation, see MSError for a list of Mobile Service’s error codes

Declared In

MSTableOperationError.h

  domain

Represents the domain of the error recieved while executing the table operation, this will typically be the MSErrorDomain, but may differ if the delegate chooses to return other error types

@property (nonatomic, readonly) NSString *domain

Discussion

Represents the domain of the error recieved while executing the table operation, this will typically be the MSErrorDomain, but may differ if the delegate chooses to return other error types

Declared In

MSTableOperationError.h

  description

A description of what caused the operation to fail

@property (nonatomic, readonly) NSString *description

Discussion

A description of what caused the operation to fail

Declared In

MSTableOperationError.h

  statusCode

The HTTP status code recieved while executing the operation from the mobile service. Note: this item may not be set if the operation failed before going to the server

@property (nonatomic, readonly) NSInteger statusCode

Discussion

The HTTP status code recieved while executing the operation from the mobile service. Note: this item may not be set if the operation failed before going to the server

Declared In

MSTableOperationError.h

  serverItem

When the status code is a precondition failure, this item will contain the current version of the item on the server

@property (nonatomic, readonly) NSDictionary *serverItem

Discussion

When the status code is a precondition failure, this item will contain the current version of the item on the server

Declared In

MSTableOperationError.h

Handling Errors

  handled

Set the handled flag to indicate that all appropriate actions for this error have been taken and the error will be removed from the list

@property (nonatomic) BOOL handled

Discussion

Set the handled flag to indicate that all appropriate actions for this error have been taken and the error will be removed from the list

Declared In

MSTableOperationError.h

– cancelOperationAndUpdateItem:completion:

Removes the pending operation so it will not be tried again the next time push is called. In addition, updates the local store state

- (void)cancelOperationAndUpdateItem:(NSDictionary *)item completion:(MSSyncBlock)completion

Discussion

Removes the pending operation so it will not be tried again the next time push is called. In addition, updates the local store state

Declared In

MSTableOperationError.h

– cancelOperationAndDiscardItemWithCompletion:

Removes the pending operation so it will not be tried again the next time push is called. In addition, removes the item associated with the operation from the local store

- (void)cancelOperationAndDiscardItemWithCompletion:(MSSyncBlock)completion

Discussion

Removes the pending operation so it will not be tried again the next time push is called. In addition, removes the item associated with the operation from the local store

Declared In

MSTableOperationError.h

Initializing the MSTableOperationError Object

– initWithOperation:item:context:error:

Initializes the table operation error from the provided operation, item, error, and context objects.

- (id)initWithOperation:(MSTableOperation *)operation item:(NSDictionary *)item context:(MSSyncContext *)context error:(NSError *)error

Discussion

Initializes the table operation error from the provided operation, item, error, and context objects.

Declared In

MSTableOperationError.h

– initWithOperation:item:error:

- (id)initWithOperation:(MSTableOperation *)operation item:(NSDictionary *)item error:(NSError *)error

– initWithSerializedItem:context:

Initializes the table operation error from a serialized representation of a MSTableOperationError.

- (id)initWithSerializedItem:(NSDictionary *)item context:(MSSyncContext *)context

Discussion

Initializes the table operation error from a serialized representation of a MSTableOperationError.

Declared In

MSTableOperationError.h

– initWithSerializedItem:

- (id)initWithSerializedItem:(NSDictionary *)item

Serializing the MSTableOperationError Object

– serialize

Returns an NSDictionary with two keys, id and properties, where properties contains a serialized version of the error

- (NSDictionary *)serialize

Discussion

Returns an NSDictionary with two keys, id and properties, where properties contains a serialized version of the error

Declared In

MSTableOperationError.h