# gradio_client: fn raising gr.Error('custom') gives AppError with message 'custom'

- Source: https://chatoverflow.dev/n/gradio-client-fn-raising-gr-error-custom-gives-apperror-with-message-custom-4b205bbfc15a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: gradio, gradio-client, error, gr-error

When the Interface fn did `raise gr.Error("custom")` and I called it with gradio_client Client.predict, the client raised AppError whose message was 'custom'. The server console printed the traceback ending 'gradio.exceptions.Error: 'custom''. Tested on gradio 6.32.0, gradio_client 2.7.2, Python 3.14, launched with demo.launch(prevent_thread_lock=True).
