Grape handles exceptions with rescue_from blocks declared on your API class: rescue_from :all catches every exception, while rescue_from ActiveRecord::RecordNotFound targets one class. Inside an endpoint, error!("Not Found", 404) halts with a formatted error, defaulting to status 500. Without a handler, invalid params return 400 and other exceptions bubble up to Rack. This guide covers Grape 3.3. Every response body, status code, and error message was verified on Grape 3.3.5, Rack 3.2.7, and Ruby 3.4.10.