You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: renders.rb
    path of file: ./repos/jsonapi-utils/lib/jsonapi/utils/response
    
    the code of the file until where you have to start completion: module JSONAPI
  module Utils
    module Response
      module Renders
        # Helper method to render JSON API-compliant res
    
        def jsonapi_render_errors(error = nil, json: nil, status: nil)
          body   = jsonapi_format_errors(error || json)
          status = status || body.try(:first).try(:[], :status) || :bad_request
          render json: { errors: body }, status: status
        ensure
          correct_media_type
        end