Adaption of the recent API change (error -> pongo2.Error return type).