Fix json errors getting wrapped in HTML

Disable layout template for API errors