---
title: TO_FILE_ERROR error condition
description: Documentation for the TO\_FILE\_ERROR error condition on Databricks
canonical_url: https://docs.databricks.com/gcp/en/error-messages/to-file-error-error-class
---

# TO\_FILE\_ERROR error condition

[SQLSTATE: 22KD1](https://docs.databricks.com/gcp/en/error-messages/sqlstates.md#class-22-data-exception)

Error converting to FILE type. Use `try_to_file()` to skip this file and get a null value instead.

## FAILED\_TO\_READ\_FILE

Failed to read the file at path `<path>`. Cause: `<cause>`. Refer to the stack trace for details.

## FILE\_NOT\_EXISTS

The file at path `<path>` does not exist.
