Used correct error type