Class: Onlyoffice::DocsIntegrationSdk::DocumentServer::Client::CommandService::Error

Inherits:
T::Enum
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/onlyoffice/docs_integration_sdk/document_server/client/command.rb

Overview

Error is an enum that represents the possible errors that can occur when using the command service.

Since:

  • 0.1.0

Constant Summary collapse

None =

Since:

  • 0.1.0

new(0)
MissingDocumentKey =

Since:

  • 0.1.0

new(1)
IncorrectCallbackUrl =

Since:

  • 0.1.0

new(2)
InternalError =

Since:

  • 0.1.0

new(3)
NoChanges =

Since:

  • 0.1.0

new(4)
IncorrectCommand =

Since:

  • 0.1.0

new(5)
InvalidToken =

Since:

  • 0.1.0

new(6)

Instance Method Summary collapse

Instance Method Details

#description ⇒ String

description returns the human-readable description of the error.

Returns:

  • (String)

Since:

  • 0.1.0



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/onlyoffice/docs_integration_sdk/document_server/client/command.rb', line 84

def description
  case self
  when None
    "No errors"
  when MissingDocumentKey
    "Document key is missing or no document with such key could be found"
  when IncorrectCallbackUrl
    "Callback url not correct"
  when InternalError
    "Internal server error"
  when NoChanges
    "No changes were applied to the document before the forcesave command was received"
  when IncorrectCommand
    "Command not correct"
  when InvalidToken
    "Invalid token"
  else
    # :nocov:
    # unreachable
    # :nocov:
  end
end