implemented api errors handling (for create, update and destroy)