fix issue #12192 to return {} or error message