---
title: UDF_USER_CODE_ERROR error condition
description: Documentation for the UDF\_USER\_CODE\_ERROR error condition on Databricks
canonical_url: https://docs.databricks.com/gcp/en/error-messages/udf-user-code-error-error-class
---

# UDF\_USER\_CODE\_ERROR error condition

[SQLSTATE: 39000](https://docs.databricks.com/gcp/en/error-messages/sqlstates.md#class-39-external-routine-invocation-exception)

Execution of function `<fn>` failed.

## CLASS\_NOT\_FOUND

Could not find `<type> <className>` in the provided JAR file. Ensure the class exists in the JAR and that the handler path is correct.

## CREDENTIAL\_NOT\_FOUND

The requested service credential was not found. `<detail>`

## DBCONNECT\_UNSUPPORTED

DBConnect version `<version>` is unsupported for Serverless Scala UDFs.

`<error>`

## GENERIC

\== Error ==

`<error>`

\== Stacktrace ==

`<stack>`

## HANDLER\_INPUT\_SCHEMA

Cannot find handler with name `<handler>` matching the schema `<inputSchema>`. Possible candidates: `<candidates>`.

## HANDLER\_MULTIPLE\_CANDIDATES

There are multiple methods with name `<handler>` matching the input schema `<inputSchema>`: `<candidates>`.

## HANDLER\_NOT\_PUBLIC

The handler `<type> <handler>` is not public. Java UDF handlers must be public.

## HANDLER\_NOT\_STATIC

The method `<method>` in handler `<handler>` is not static. Java UDF handler methods must be public and static.

## HANDLER\_RETURN\_TYPE

Cannot convert return type `<returnType>` of handler `<handler>` to the expected SQL type `<sqlReturnType>`.

## HANDLER\_UNKNOWN

Cannot find handler with name `<handler>`. Check that this handler exists in UDF dependencies.

## INPUT\_CONVERSION

\== Error ==

`<error>`

## INPUT\_SIZE\_LIMIT

The serialized input for a UDF request exceeded the configured limit of `<maxInputSize>`. Reduce the size of the values passed to the UDF in each row.

## INTERNAL\_MEMORY\_LIMIT

The internal memory limit has been reached. Consider reducing the size of each row passed to the UDF.

## LANGUAGE\_MISMATCH

The specified language (`<specifiedLanguage>`) does not match the actual language of the handler (`<actualLanguage>`). Update the language in your UDF definition.

## OOM

Function ran out of memory during execution.

This may be caused by excessive memory usage of the running code.

## OOM\_DRIVER

Driver-side function ran out of memory during execution.

This may be caused by excessive memory usage of the running code.

## PAYLOAD

`<error>`

## PAYLOAD\_SIZE

The UDF payload is too large (`<actualPayloadSize>` bytes, limit is `<maxPayloadSize>` bytes).

## RESULT\_CONVERSION

Consider changing the function to return a value that fits the return type.

\== Error ==

`<error>`

## SCALA\_VERSION\_MISMATCH

The UDF or its dependencies are compiled with Scala 2.12, which is incompatible with this compute environment (Scala 2.13). Recompile with Scala 2.13.

`<detail>`

## SECRET\_NOT\_DECLARED

Secret `<secret>` is not declared in the `SECRETS` clause of this function. Add it to the `SECRETS` clause in the function definition.

## SECRET\_NOT\_FOUND

The requested secret was not found. `<detail>`

## UDF\_CLASS\_MISSING

\== Error ==

`<error>`

Please see `<docLink>` for information on how to fix this.

\== Stacktrace ==

`<stack>`
