提交 b5431d78 编写于 作者: J Jon Moss

Merge pull request #23870 from akshaymohite/api-app-debug-exception-response-format-in-doc

[ci skip] Need to mention debug_exception_response_format in the api_app documentation.
......@@ -166,6 +166,23 @@ class definition:
config.api_only = true
```
In `config/environments/development.rb`, set `config.debug_exception_response_format`
to configure the format used in responses when errors occur in development mode.
To render an HTML page with debugging information, use the value `:default`.
```ruby
config.debug_exception_response_format = :default
```
To render debugging information preserving the response format, use the value `:api`.
```ruby
config.debug_exception_response_format = :api
```
By default, `config.debug_exception_response_format` is set to `:api`.
Finally, inside `app/controllers/application_controller.rb`, instead of:
```ruby
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册