Please use this method from XDCommonResponseHelper: public RegistryResponseType createError(Throwable e);