Fixing implementation of request operation errors

Minor reformatting & refactoring