Move error handling
Move error handling

psycopg2 errors occur only on execution. Move catch clause to corresponding try block

tom-heimbrodt/oeplatform,tom-heimbrodt/oeplatform,openego/oeplatform,tom-heimbrodt/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform