Format Error message for API
Now API also support tags