• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gregschmit / rails-rest-framework / 4002900794

pending completion
4002900794

push

github

GitHub
Bump commonmarker from 0.23.6 to 0.23.7 in /docs

807 of 890 relevant lines covered (90.67%)

74.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/rest_framework/errors.rb
1
# Top-level class for all REST Framework errors.
2
class RESTFramework::Error < StandardError
1✔
3
end
4

5
class RESTFramework::NilPassedToAPIResponseError < RESTFramework::Error
1✔
6
  def message
1✔
7
    return <<~MSG.split("\n").join(" ")
3✔
8
      Payload of `nil` was passed to `api_response`; this is unsupported. If you want a blank
9
      response, pass `''` (an empty string) as the payload. If this was the result of a `find_by`
10
      (or similar Active Record method) not finding a record, you should use the bang version (e.g.,
11
      `find_by!`) to raise `ActiveRecord::RecordNotFound`, which the REST controller will catch and
12
      return an appropriate error response.
13
    MSG
14
  end
15
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc