flack 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83938d22a1da3371d405bc6f6f9ad5458d2e44ac21616b99df1d3f1058ffbc40
4
- data.tar.gz: 5c844ae9c4eeca795a70cbcacfd616e40217b120ca75ae6d8368e343bb87746c
3
+ metadata.gz: 36dd9d587c7d003cc296db2fc3ac9f7dac0916e267a43904f5ca8be1e25b780e
4
+ data.tar.gz: 1bc04ec7696966e9d197b80c25af1a76309463eabc88222d4777d769f866f9c6
5
5
  SHA512:
6
- metadata.gz: 43ca7e422779cc153db5c11db80a7048a9f526de6f2382e88b67a1b3fb12418f9a4a3e87e72b948bb685bd22e18ae8bb3d5d549dd24d00d840ce6b3f16ac5a17
7
- data.tar.gz: fdca36864febf3ac369363de3fbe1b1687efbeb850f84b5ba3131d7af66d710d4e61d163a33c18c3b4923314c8eb3f7ddad3992e169de085aec80b476ac3d2c2
6
+ metadata.gz: f8f69c70110ed67738d5c0ef95b97d4d0d0612520bbe8bab4c0353018f9bd0476bc48f29644514d3628cd2edb446abacdb38bf5392e2fbf95044a6401c7a3d37
7
+ data.tar.gz: 59784ead309c9df695c416af89087d1fdf5e16d7900c758027da2f771b48337774252ee792e47fac32ba43fce0a86d2600798e155e420aecb357c1a235843bea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
 
2
- # flack CHANGELOG.md
2
+ # CHANGELOG.md
3
+
4
+
5
+ ## flack 1.2.1 released 2021-04-08
6
+
7
+ - Respond with a proper 500 error when necessary (and dump to $stderr)
3
8
 
4
9
 
5
10
  ## flack 1.2.0 released 2021-03-29
data/lib/flack.rb CHANGED
@@ -8,7 +8,7 @@ require 'flor/unit'
8
8
 
9
9
  module Flack
10
10
 
11
- VERSION = '1.2.0'
11
+ VERSION = '1.2.1'
12
12
  end
13
13
 
14
14
  require 'flack/app'
data/lib/flack/app.rb CHANGED
@@ -92,6 +92,16 @@ class Flack::App
92
92
  end
93
93
 
94
94
  respond_not_found(env)
95
+
96
+ rescue => err
97
+
98
+ $stderr.puts '=' * 80
99
+ $stderr.puts Time.now.to_s
100
+ $stderr.puts err.inspect
101
+ $stderr.puts err.backtrace
102
+ $stderr.puts ('=' * 79) + '.'
103
+
104
+ respond_internal_server_error(env, err)
95
105
  end
96
106
 
97
107
  def get_debug(env); debug_respond(env); end
@@ -184,5 +184,10 @@ class Flack::App
184
184
 
185
185
  respond(env, {}, code: 404, error: error)
186
186
  end
187
+
188
+ def respond_internal_server_error(env, error=nil)
189
+
190
+ respond(env, {}, code: 500, error: error)
191
+ end
187
192
  end
188
193
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flor