Set error type