forest_admin_rails 1.8.7 → 1.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 709e0dbc69911ea899ee0f94268241f30e0575839f41c54074547cae7e1bc7ea
4
- data.tar.gz: 9002d3f6fec64a0408ee193155ee124bbf80d741ee6d5bdfcebb3abbaffae247
3
+ metadata.gz: 7da199416dd8b5dccdaed09a325794b723f27a3cd119317f245b8e7ccca82c0e
4
+ data.tar.gz: 640527d12f2ec36119ffc0a114d8fd1e84c4c832a2f621092d59bf6d2230ae6f
5
5
  SHA512:
6
- metadata.gz: e670c4c23d7ba4f3ea07649cd04e76e8f262a9114829204493c0fec8ed1f56f645d1e0af2a02b381f48e513d4e3f48c195a6cf4fde740c4add200fa060b39b08
7
- data.tar.gz: 9a9828486150fba79fdec35be6a03c67c84f058b1a2dbff787ebd4b924cd422c93b7d80e0b4526dd221a21b7dd2e84d713731df687fc08f8f8a56fe63cfa6ece
6
+ metadata.gz: 1eb8b368a4204e0519fa1e294df2b24a9aa0daf1305affde6894d078a48486079cb3500e23f05ddfda52fb49e8eb30b2e70956ede649c8e115ad1349809c21cc
7
+ data.tar.gz: 66236e586423b82a7909fd4d52483a4f5f79e13c276f3a9779de831800dd3e449cc6885c051dc70efd94e07735ecdec0ed12975e2556b55825b87844de4798a4
@@ -40,6 +40,8 @@ module ForestAdminRails
40
40
  end
41
41
 
42
42
  def exception_handler(exception)
43
+ http_status = get_error_status(exception)
44
+
43
45
  data = case exception
44
46
  when ForestAdminAgent::Http::Exceptions::AuthenticationOpenIdClient,
45
47
  OpenIDConnect::Exception
@@ -54,7 +56,7 @@ module ForestAdminRails
54
56
  {
55
57
  name: exception.respond_to?(:name) ? exception.name : exception.class.name,
56
58
  detail: get_error_message(exception),
57
- status: exception.try(:status),
59
+ status: http_status,
58
60
  data: exception.try(:data)
59
61
  }
60
62
  ]
@@ -65,7 +67,7 @@ module ForestAdminRails
65
67
  ForestAdminAgent::Facades::Container.logger.log('Error', exception.full_message)
66
68
  end
67
69
 
68
- render json: data, status: exception.try(:status) || 500
70
+ render json: data, status: http_status
69
71
  end
70
72
  end
71
73
  end
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRails
2
- VERSION = "1.8.7"
2
+ VERSION = "1.8.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu