diff options
author | Sean McGivern <sean@gitlab.com> | 2017-03-01 11:00:37 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-03-01 15:28:10 +0000 |
commit | 811e598f607235d89e71d09d99538ee4dee3ffed (patch) | |
tree | 7608961ebb9c672836dd2e3f03eb56920e7b4ef3 /lib/api/api_guard.rb | |
parent | 8dd097a91530e4b047c4b391f21047c7d29d310d (diff) | |
download | gitlab-ce-811e598f607235d89e71d09d99538ee4dee3ffed.tar.gz |
Enable and autocorrect the CustomErrorClass cop
Diffstat (limited to 'lib/api/api_guard.rb')
-rw-r--r-- | lib/api/api_guard.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb index c11f8529183..409cb5b924f 100644 --- a/lib/api/api_guard.rb +++ b/lib/api/api_guard.rb @@ -160,13 +160,10 @@ module API # Exceptions # - class MissingTokenError < StandardError; end - - class TokenNotFoundError < StandardError; end - - class ExpiredError < StandardError; end - - class RevokedError < StandardError; end + MissingTokenError = Class.new(StandardError) + TokenNotFoundError = Class.new(StandardError) + ExpiredError = Class.new(StandardError) + RevokedError = Class.new(StandardError) class InsufficientScopeError < StandardError attr_reader :scopes |