Webdav Fatal Exception: Failed to write file contents: Storage unauthorized

Nextcloud version: 12.0.2
Operating system and version: Ubuntu 16.04
Apache or nginx version: nginx 1.10.3
PHP version: 7.0.22 FPM
Is this the first time you’ve seen this error?: No, happened today many many times.

The issue you are facing: Users can’t upload some files. The client log says “Failed to write file contents: Storage unauthorized. Unknown error”. After forcing the upload some times, the errors went away. Looking trough the server log I fond the following:

The output of your Nextcloud log in Admin > Logging:


Additional info: I’m using OpenStack Swift as Storage Back-end. The PHP and NGINX logs shows nothing about this error.