api: throw HTTPException instead of calling api_error directly
api: throw HTTPException instead of calling api_error directly

there was some places where api_error() was called instead of throwing
correct subclass of HTTPException. This was causing php errors.

Dogygen comment of api_error() is updated as well

dissolve/friendica,tobiasd/friendica,tobiasd/friendica,dissolve/friendica,fabrixxm/friendica,annando/friendica,friendica/friendica,tobiasd/friendica,tobiasd/friendica,dissolve/friendica,dissolve/friendica,annando/friendica,fabrixxm/friendica,friendica/friendica,friendica/friendica,annando/friendica,fabrixxm/friendica,annando/friendica,fabrixxm/friendica,friendica/friendica,dissolve/friendica,tobiasd/friendica,friendica/friendica,fabrixxm/friendica,annando/friendica