See https://forum.xwiki.org/t/prefer-async-await-over-promise-chaining-in-javascript-and-typescript/18966/