Overview:
A user encounters an unexpected error when implementing the import annotation API:
Error: type=UNEXPECTED_ERROR, message=An unexpected error has occurred.
API: /api/{version}/objects/documents/{doc_id}/annotations
Root Cause:
The root cause of this issue appears to be the length of the file name provided when making a request to Import Annotations using the Vault API.
The maximum number of UTF-8 characters for the file name in the Import Annotations request must not be greater than 218.
The maximum number of UTF-8 characters supported in a Linux file system is 255.
37 of these characters are used for the unique id that is appended to the file name when the Import Annotations request is made.
Solution:
To resolve this issue, do the following:
- Update the length of the filename to 218 UTF-8 characters or less.
- Use the API to import the annotation again.
Related Documentation:
Vault Help Documentation: Upload Document Annotations API