These are the baseline responses for all commands. Some commands will add more data and functionality.
Commands fall generally into two categories. Those which respond with Success or Error and those which respond with Hit, Miss, or Error.
Returned in lieu of an exception.
- innerException: Exception - the exception which caused the error
- message(): string - a human readable error message
- innerException(): Exception - the original exception.
- errorCode(): MomentoErrorCode - Momento’s own category of errors such as InvalidArgument or BadRequest. See Standards And Practices - Error Handling
- toString(): string - alias for message()
The command was successful.
The key or field exists in the cache. Usually extended to return a value.
The key or field does not exist in the cache.
For TTL commands, the update was applied successfully.
For TTL commands, the update was not applied and no change was made to the existing TTL.
For setIfNotExists commands, the key did not exist and the value was set.
For setIfNotExists commands, the key existed and no value was set.