static const char INCONSISTENT_DB[] = "Data in provisioning DB is inconsistent";
static const char AUTHENTICATION_FAILURE[] = "Authentication failure";
static const char NOT_ALLOWED_OXM[] = "Not allowed ownership transfer method";
+ static const char CONTINUE_OPERATION[] = "Error happened but current operation should continue";
static const char USER_DENIED_REQ[] = "Request denied by User";
static const char NOT_ACCEPTABLE[] = "Request not acceptable";
static const char PUBLISH_RESOURCE_FAILED[] = "Publish Resource failure";
static const char INTERNAL_SERVER_ERROR[] = "Internal server error";
static const char BAD_ENDPOINT[] = "Bad Endpoint";
static const char GATEWAY_TIMEOUT[] = "Gateway Timeout";
+ static const char SERVICE_UNAVAILABLE[] = "Service Unavailable";
}
namespace Error
return OC::Exception::AUTHENTICATION_FAILURE;
case OC_STACK_NOT_ALLOWED_OXM:
return OC::Exception::NOT_ALLOWED_OXM;
+ case OC_STACK_CONTINUE_OPERATION:
+ return OC::Exception::CONTINUE_OPERATION;
case OC_STACK_USER_DENIED_REQ:
return OC::Exception::USER_DENIED_REQ;
case OC_STACK_NOT_ACCEPTABLE:
return OC::Exception::BAD_ENDPOINT;
case OC_STACK_GATEWAY_TIMEOUT:
return OC::Exception::GATEWAY_TIMEOUT;
+ case OC_STACK_SERVICE_UNAVAILABLE:
+ return OC::Exception::SERVICE_UNAVAILABLE;
}
return OC::Exception::UNKNOWN_ERROR;
OC_STACK_INCONSISTENT_DB,
OC_STACK_AUTHENTICATION_FAILURE,
OC_STACK_NOT_ALLOWED_OXM,
+ OC_STACK_CONTINUE_OPERATION,
OC_STACK_USER_DENIED_REQ,
OC_STACK_NOT_ACCEPTABLE,
OC_STACK_FORBIDDEN_REQ,
OC_STACK_INTERNAL_SERVER_ERROR,
OC_STACK_BAD_ENDPOINT,
- OC_STACK_GATEWAY_TIMEOUT
+ OC_STACK_GATEWAY_TIMEOUT,
+ OC_STACK_SERVICE_UNAVAILABLE
};
std::string resultMessages[]=
OC::Exception::INCONSISTENT_DB,
OC::Exception::AUTHENTICATION_FAILURE,
OC::Exception::NOT_ALLOWED_OXM,
+ OC::Exception::CONTINUE_OPERATION,
OC::Exception::USER_DENIED_REQ,
OC::Exception::NOT_ACCEPTABLE,
OC::Exception::FORBIDDEN_REQ,
OC::Exception::INTERNAL_SERVER_ERROR,
OC::Exception::BAD_ENDPOINT,
- OC::Exception::GATEWAY_TIMEOUT
+ OC::Exception::GATEWAY_TIMEOUT,
+ OC::Exception::SERVICE_UNAVAILABLE
};
TEST(OCExceptionTest, ReasonCodeMatches)
{