Skip to content

Commit f768b73

Browse files
committed
raising exception for pulse comments that are missing :parent attribute
1 parent b750421 commit f768b73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rest/v2/pulse.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def submit_pulse(pulse)
6868
# @see https://docs.bitfinex.com/reference#rest-auth-pulse-add
6969
###
7070
def submit_pulse_comment(pulse)
71+
if pulse[:parent].to_s.strip.empty?
72+
raise ":parent (pulse id value) is required for comments"
73+
end
7174
resp = authenticated_post("auth/w/pulse/add", params: pulse).body
7275
Bitfinex::Models::Pulse.unserialize(resp)
7376
end

0 commit comments

Comments
 (0)