Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Apply suggestions from code review
seb2561a6943ae6
diff --git a/api/app/services/spree/webhooks/endpoints/make_request.rb b/api/app/services/spree/webhooks/endpoints/make_request.rbindex 92148c01d7..b272744133 100644--- a/api/app/services/spree/webhooks/endpoints/make_request.rb+++ b/api/app/services/spree/webhooks/endpoints/make_request.rb@@ -12,7 +12,8 @@ module Spreedef callreturn if body == ''- Rails.logger.debug("Making a request to #{url} with body #{body}")+ Rails.logger.debug("[SPREE WEBHOOKS] #{object_class_name} #{event_name} sending to #{url}")+ Rails.logger.debug("[SPREE WEBHOOKS] body: #{body}")if unprocessable_uri?Rails.logger.warn(UNPROCESSABLE_MSG)@@ -31,9 +32,9 @@ module Spreeattr_reader :body, :url- FAIL_MSG = 'Webhook request finished with errors'+ FAIL_MSG = '[SPREE WEBHOOKS] #{object_class_name} #{event_name} failed for #{url}'HEADERS = { 'Content-Type' => 'application/json' }.freeze- SUCCESS_MSG = 'Webhook request completed successfully'+ SUCCESS_MSG = "[SPREE WEBHOOKS] #{object_class_name} #{event_name} success for URL #{url}"UNPROCESSABLE_MSG = 'Can not make a request to the given URL'private_constant :FAIL_MSG, :HEADERS, :SUCCESS_MSG, :UNPROCESSABLE_MSG