Standardising the api errors and methods

Bug: 45276 50588
Change-Id: Ibc91a10bf098055e4a8c35f6a512911bb7fbe82f
Merge "Standardising the api errors and methods"