arkaan 1.2.1 → 1.2.2

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
  SHA1:
3
- metadata.gz: 3b77b147e1e1e45a725b319bd821485c1fd84a6e
4
- data.tar.gz: 29013510f2588c75432c61ca845b372ac2e5737c
3
+ metadata.gz: 94f9e526dfd7aa11a9d103f9b1d39d93c724ab1c
4
+ data.tar.gz: 606bcf3b0d470038dfaaed5142459ec9c8f2e0f4
5
5
  SHA512:
6
- metadata.gz: 68750dcc455d7f4ec7125c84447e451c29034f892fd97c066e90808574915444c7c4cc9cd656a9c55e23a3318b32929b69e9869e0b242944c6f431a01b1d3fce
7
- data.tar.gz: dcfb72041acf5b265b6d1956b78f46649dac0e95883ccd44e560e96bf83675e3664baa2cbe91b0c6b98ec832d90086f8764eaaf6b62839d3df10c790c2390a95
6
+ metadata.gz: 0dcb37e5a1c65e6613e4596d0c19487387628b01494b0957dc81017a24407748244b2449719e2d93ad067f4a6a4441054874d872e4faf693fac2ffa0fc370f50
7
+ data.tar.gz: b1ccc26cd9d60a8e76267f0d47f95a2b49d26abd2eeaf0bc76fe59f31ee7ce97cd5d225f87e0b571d1f44de3c4ef23e3c5559bb500643c36ae0afb4acdc42458
@@ -128,7 +128,8 @@ module Arkaan
128
128
  # @param path [String] the path in the configuration file to access the URL.
129
129
  def custom_error(status, path)
130
130
  route, field, error = path.split('.')
131
- halt status, {status: status, field: field, error: error, docs: settings.errors[route][field][error]}.to_json
131
+ docs = settings.errors[route][field][error] rescue ''
132
+ halt status, {status: status, field: field, error: error, docs: docs}.to_json
132
133
  end
133
134
 
134
135
  # Halts the application with a Bad Request error affecting a field of a model.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arkaan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois