Refactor error classes
All runner errors are now in a single file. The not found error has been splitted into an error for runner not found and for environment not found.
This commit is contained in:

committed by
Sebastian Serth

parent
413f9b2705
commit
b48b45de9f
@ -1,3 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error < ApplicationError; end
|
||||
class Runner
|
||||
class Error < ApplicationError
|
||||
class BadRequest < Error; end
|
||||
|
||||
class EnvironmentNotFound < Error; end
|
||||
|
||||
class ExecutionTimeout < Error; end
|
||||
|
||||
class InternalServerError < Error; end
|
||||
|
||||
class NotAvailable < Error; end
|
||||
|
||||
class Unauthorized < Error; end
|
||||
|
||||
class RunnerNotFound < Error; end
|
||||
|
||||
class Unknown < Error; end
|
||||
end
|
||||
end
|
||||
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::BadRequest < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::ExecutionTimeout < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::InternalServerError < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::NotAvailable < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::NotFound < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::Unauthorized < Runner::Error; end
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Runner::Error::Unknown < Runner::Error; end
|
Reference in New Issue
Block a user