improved error messages

add more descriptive error messages, fix for https://github.com/owncloud/core/issues/10266

cc @jancborchardt @georgehrke @MorrisJobke @tomneedham