mintsoft 0.1.4 → 0.1.5

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: fecc0acb93629b1094c612dcf46ef86985971c4ec68a186acf5253632b40daab
4
- data.tar.gz: ddd639413c7fad8c612f33cfe0e130db31df19bfff1273122763b264bc11e15a
3
+ metadata.gz: f317c96d49df00a91bb679b079da14192f53ee373bedd233b68a373694f82528
4
+ data.tar.gz: 181fbdf0b85db468c9537dc1fb2c4d8cb41c8651487056cc9e71a8b3007f41ac
5
5
  SHA512:
6
- metadata.gz: 30bb5d08f1fa6a8a87f1e18249ae98d48ce61bf6596c78adef4cb8dc27b675db83eae05445bf583fc0ba2b3a4e0ed68c9187afbf74540e9ccb907f5c6f994d95
7
- data.tar.gz: 5fa4691f5ee53c469004ab8a9fd57b873b79327880a8694eb7162cb0df779b426bc8eb9be704acab6132efcc5c94af5bb151f9ccfbf950a8bfb4cd4494fc1208
6
+ metadata.gz: 122feb85df1c698d875f4494f5b3a31a9401378ff0629bcf5328ccaa26d06057bc0f7f0b6b5213762c663a2220d48569c3b9fd5f226f0969fd72c44fec0b37e5
7
+ data.tar.gz: 4e5db4e19ff76da89ae50dd1d05d3303d1e4dc34a0c32896875fad648795acf1f86a0760914faf5f244012308451294d083a5a9aec35f82ddd4456baf8d260b1
@@ -5,6 +5,9 @@ require "faraday/net_http"
5
5
 
6
6
  module Mintsoft
7
7
  class AuthClient
8
+ # Authentication errors specific to auth client
9
+ class AuthenticationError < APIError; end
10
+
8
11
  BASE_URL = "https://api.mintsoft.co.uk"
9
12
 
10
13
  attr_reader :base_url, :conn_opts
@@ -67,7 +70,7 @@ module Mintsoft
67
70
  def handle_error_response(response)
68
71
  case response.status
69
72
  when 401
70
- raise AuthenticationError, "Invalid credentials"
73
+ raise AuthClient::AuthenticationError, "Invalid credentials"
71
74
  when 400
72
75
  raise ValidationError, "Invalid request: #{extract_error_message(response.body)}"
73
76
  else
@@ -15,6 +15,7 @@ module Mintsoft
15
15
  # General API-related errors
16
16
  class APIError < Error; end
17
17
 
18
+
18
19
  # Authentication and authorization errors
19
20
  class AuthenticationError < APIError; end
20
21
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mintsoft
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mintsoft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Chong