[863746] Error handling plus error codes for API logic