lib/eml/response.rb in eml-2.0.0 vs lib/eml/response.rb in eml-2.1.0
- old
+ new
@@ -82,10 +82,10 @@
end
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
sig { returns(T.nilable(EML::RESTError)) }
def check_for_incorrectly_categorised_errors
- if error.match?(/is not in (the proper|a valid) status/)
+ if error&.match?(/is not in (the proper|a valid) status/)
raise T.unsafe(EML::REST::UnprocessableEntityError).new(error, self)
end
end
sig { returns(T.nilable(EML::RESTError)) }