We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08f825b commit aaa7819Copy full SHA for aaa7819
1 file changed
lib/typesense/documents.rb
@@ -51,16 +51,14 @@ def import(documents, options = {})
51
52
if documents.is_a?(Array)
53
results_in_jsonl_format.split("\n").map do |r|
54
- begin
55
- Oj.load(r)
56
- rescue Oj::ParseError => e
57
- {
58
- "success" => false,
59
- "exception" => e.class.name,
60
- "error" => e.message,
61
- "json" => r,
62
- }
63
- end
+ Oj.load(r)
+ rescue Oj::ParseError => e
+ {
+ 'success' => false,
+ 'exception' => e.class.name,
+ 'error' => e.message,
+ 'json' => r
+ }
64
end
65
else
66
results_in_jsonl_format
0 commit comments