lib/fluent/plugin/bigquery/writer.rb in fluent-plugin-bigquery-0.4.4 vs lib/fluent/plugin/bigquery/writer.rb in fluent-plugin-bigquery-0.5.0.beta1

- old
+ new

@@ -111,18 +111,12 @@ end rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e @client = nil reason = e.respond_to?(:reason) ? e.reason : nil - error_data = { project_id: project, dataset: dataset, table: table_id, code: e.status_code, message: e.message, reason: reason } - wrapped = Fluent::BigQuery::Error.wrap(e) - if wrapped.retryable? - log.warn "tabledata.insertAll API", error_data - else - log.error "tabledata.insertAll API", error_data - end + log.error "tabledata.insertAll API", project_id: project, dataset: dataset, table: table_id, code: e.status_code, message: e.message, reason: reason - raise wrapped + raise Fluent::BigQuery::Error.wrap(e) end def create_load_job(chunk_id, project, dataset, table_id, upload_source, fields) configuration = { configuration: {