WL-2628 Return errors in application/json when request was made that way