9DECAE1C81FF44CD900F5C17C8F05086
  • Thomas Pollinger
  • 05.12.2019
  • DE

Asset Folder: REST API Error Codes

Eine Frage aus unserer Slack-Community zur neuen REST API für den Asset Folder war: Welche Error-Codes gibt es und was bedeuten diese?

Hintergrund: Die HTTP Status Codes eindeutig, da diese in der Swagger Dokumentation der REST-API beschrieben sind. In der Diskussion ging es primär um die Error-Codes, welche im Response enthalten sind.

Beispiel:

{
  "CommitResults": [
    {
      "$type": "AssetCommitResult",
      "Asset": null,
      "TemporaryName": "2E0605FE0A35427489A7514B8446B885",
      "IsSuccess": false,
      "ErrorCode": 7
    }
  ]
}

 

Als Ergebnis wurden die aktuell gültigen Error-Codes für 16.0.3 des Management Servers gepostet. ;)

Hier also alle Error-Codes, die einem momentan in der REST API begegnen können:

0 = Unknown
An unknown exception.

1 = Unauthorized
The user has no session.

2 = UnknownProject
The requested project is not available.

3 = NotFound
The requested asset or folder was not found.

5 = AlreadyExists
The system was asked to create an asset or folder where one already exists.

6 = NotSupported
The requested operation is not supported by the underlying repository.
Hinweis: This can occur, for example, if the system is asked to upload a file into a repository which generally does not support uploads. It does not occur if the user is not authorized to upload files even though it is technically possible.

7 = InvalidName
The operation could not complete because it tried to assign a name to an entity for which that name is invalid.
Hinweis: This can occur, for example, if someone tries to create or rename an asset or folder while using a name for it which contains characters which are deemed illegal by the underlying repository. A repository might not accept folder names containing slashes, for example.

8 = NotAllowed
The operation could not complete because, even though it is possible in theory, the user is not authorized to do it.
Hinweis: This can occur, for example, if a user tries to delete an asset but does not have the rights to do it, even though the repository does have asset deletion capabilities.

9 = StillInUse
The operation could not complete because the resource is still being used somewhere, which is prohibited for the requested operation.

10 = UnsupportedType
The operation could not complete because the resource type is not supported by the underlying repository.
Hinweis: This can occur, for example, if a user tries to access an old (v1) asset via the new (v2) interface.

11 = NotAnImage
The operation could not complete because the resource type is not a valid image, but the operation requires this.
Hinweis: This can occur, for example, if a user tries to update the binary of an asset with data that can not be converted into the asset's original format.

12 = MethodNotAllowed
The http request method is not allowed for the desired action.
Hinweis: This can occur, for example, if a GET is usd to upload a file.

13 = TooLarge
The file size exceed the folder's maximum allowed file size.


Über den Autor:
Thomas Pollinger

... ist Senior Site Reliability Engineer bei der Vodafone GmbH in Düsseldorf. Seit dem Jahr 2007 betreut er zusammen mit seinen Kollegen die OpenText- (vormals RedDot-) Plattform Web Site Management für die deutsche Konzernzentrale.

Er entwickelt Erweiterungen in Form von Plug-Ins und PowerShell Skripten. Seit den Anfängen in 2001 (RedDot CMS 4.0) kennt er sich speziell mit der Arbeitweise und den Funktionen des Management Server aus.