Exception: Dcmgr::Endpoints::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Dcmgr::Endpoints::APIError
- Defined in:
- lib/dcmgr/endpoints/errors.rb
Direct Known Subclasses
Class Method Summary collapse
-
.error_code(code = nil) ⇒ Object
Internal error code of the error.
-
.status_code(code = nil) ⇒ Object
HTTP status code of the error.
Instance Method Summary collapse
Class Method Details
.error_code(code = nil) ⇒ Object
Internal error code of the error.
47 48 49 50 51 52 |
# File 'lib/dcmgr/endpoints/errors.rb', line 47 def self.error_code(code=nil) if code @error_code = code end @error_code || raise("@error_code for the class is not set") end |
.status_code(code = nil) ⇒ Object
HTTP status code of the error.
39 40 41 42 43 44 |
# File 'lib/dcmgr/endpoints/errors.rb', line 39 def self.status_code(code=nil) if code @status_code = code end @status_code || raise("@status_code for the class is not set") end |
Instance Method Details
#error_code ⇒ Object
58 59 60 |
# File 'lib/dcmgr/endpoints/errors.rb', line 58 def error_code self.class.error_code end |
#status_code ⇒ Object
54 55 56 |
# File 'lib/dcmgr/endpoints/errors.rb', line 54 def status_code self.class.status_code end |