Please take a look at the responses for these two Rack apps. It seems Puma doesn't handle SyntaxError properly as it does for regular errors:
# config.ru for regular error
run ->(env) { raise 'Error' }
# config.ru for SyntaxError
run ->(env) { require_relative 'abc' }
# abc.rb
class # invalid syntax
Would it be possible for Puma to fix the HTTP response in the latter case?