RestApi: fixed error code in oauth resource