Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
ast (2.4.2)
ast (2.4.3)
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
Expand All @@ -88,8 +88,8 @@ GEM
multi_xml (>= 0.5.2)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.10.2)
language_server-protocol (3.17.0.4)
json (2.18.1)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
loofah (2.19.1)
crass (~> 1.0.2)
Expand Down Expand Up @@ -118,10 +118,11 @@ GEM
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.26.3)
parser (3.3.7.1)
parallel (1.27.0)
parser (3.3.10.1)
ast (~> 2.4.1)
racc
prism (1.9.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -160,7 +161,7 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.3.1)
regexp_parser (2.10.0)
regexp_parser (2.11.3)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -174,19 +175,20 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.6)
rubocop (1.74.0)
rubocop (1.84.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.38.1)
parser (>= 3.3.1.0)
rubocop-ast (1.49.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
ruby-progressbar (1.13.0)
thor (1.2.1)
timeout (0.3.1)
Expand Down
4 changes: 2 additions & 2 deletions lib/resend/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ def process_response(resp)
end

def error_response?(resp)
resp[:statusCode] && (resp[:statusCode] != 200 && resp[:statusCode] != 201)
resp[:statusCode] && resp[:statusCode] != 200 && resp[:statusCode] != 201
end

def set_idempotency_key
# Only set idempotency key if the verb is POST for now.
#
# Does not set it if the idempotency_key is nil or empty
if @verb.downcase == "post" && (!@options[:idempotency_key].nil? && !@options[:idempotency_key].empty?)
if @verb.downcase == "post" && !@options[:idempotency_key].nil? && !@options[:idempotency_key].empty?
@headers["Idempotency-Key"] = @options[:idempotency_key]
end
end
Expand Down