OC_STACK_PRESENCE_TIMEOUT,
OC_STACK_PRESENCE_DO_NOT_HANDLE,
#endif
+
+ /** ERROR code from server */
+ OC_STACK_FORBIDDEN_REQ, /** 403*/
+ OC_STACK_INTERNAL_SERVER_ERROR, /** 500*/
+
/** ERROR in stack.*/
OC_STACK_ERROR = 255
/** Error status code - END HERE.*/
result = OC_STACK_ERROR;
break;
case OC_EH_FORBIDDEN:
- result = OC_STACK_RESOURCE_ERROR;
+ result = OC_STACK_FORBIDDEN_REQ;
+ break;
+ case OC_EH_INTERNAL_SERVER_ERROR:
+ result = OC_STACK_INTERNAL_SERVER_ERROR;
break;
case OC_EH_RESOURCE_CREATED:
result = OC_STACK_RESOURCE_CREATED;
case CA_REQUEST_ENTITY_TOO_LARGE:
ret = OC_STACK_TOO_LARGE_REQ;
break;
+ case CA_FORBIDDEN_REQ:
+ ret = OC_STACK_FORBIDDEN_REQ;
+ break;
+ case CA_INTERNAL_SERVER_ERROR:
+ ret = OC_STACK_INTERNAL_SERVER_ERROR;
+ break;
default:
break;
}
case OC_STACK_UNAUTHORIZED_REQ:
ret = CA_UNAUTHORIZED_REQ;
break;
+ case OC_STACK_FORBIDDEN_REQ:
+ ret = CA_FORBIDDEN_REQ;
+ break;
+ case OC_STACK_INTERNAL_SERVER_ERROR:
+ ret = CA_INTERNAL_SERVER_ERROR;
+ break;
default:
break;
}