Commit 78d458489de8843b5fc9d87abe30e4315f7f235e
1 parent
3dd2b47e
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Palitive for the broken API log
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
lib/noosfero/api/api.rb
| ... | ... | @@ -12,6 +12,13 @@ module Noosfero |
| 12 | 12 | use GrapeLogging::Middleware::RequestLogger, { logger: logger } |
| 13 | 13 | |
| 14 | 14 | rescue_from :all do |e| |
| 15 | + # Many brave warriors have fallen in the battle of fixing the API log | |
| 16 | + # Please, don't remove these 2 lines until the API log problem has | |
| 17 | + # been PROPERLY fixed by our savior!!! | |
| 18 | + # Otherwise we will have no clue of what went wrong in the API | |
| 19 | + puts "API error during processing: #{$!}" | |
| 20 | + puts "Backtrace:\n\t#{e.backtrace.join("\n\t")}" | |
| 21 | + # Thanks! | |
| 15 | 22 | logger.error e |
| 16 | 23 | end |
| 17 | 24 | |
| ... | ... | @@ -61,4 +68,4 @@ module Noosfero |
| 61 | 68 | end |
| 62 | 69 | end |
| 63 | 70 | end |
| 64 | 71 | -end |
| 72 | +end | |
| 65 | 73 | \ No newline at end of file | ... | ... |