diff --git a/lib/rspec/openapi/hooks.rb b/lib/rspec/openapi/hooks.rb index 7e4dc255..5e536c43 100644 --- a/lib/rspec/openapi/hooks.rb +++ b/lib/rspec/openapi/hooks.rb @@ -22,7 +22,7 @@ records.each do |record| begin RSpec::OpenAPI::SchemaMerger.reverse_merge!(spec, RSpec::OpenAPI::SchemaBuilder.build(record)) - rescue => e # e.g. SchemaBuilder raises a NotImplementedError + rescue StandardError, NotImplementedError => e # e.g. SchemaBuilder raises a NotImplementedError # NOTE: Don't fail the build records_errors << [e, record] end