Skip to main content
MediaKit

Error Handling

Errors are thrown using the PRPClientError class. When the server function has a schema defined, you can use the isValidationError to get the issues.

import { createEffect } from 'solid-js'
import { myServerQuery } from './server'
const MyClient = () => {
const query = myServerQuery(() => ({ name: 'Demo' }))
createEffect(() => {
if (query.error) {
if (query.error.isValidationError()) {
query.error.cause.fieldErrors.name // string[]
} else {
console.error('What is this', query.error.cause)
}
}
})
return (...)
}
export default MyClient

Last updated: 5/30/25, 9:16 AM

MediaKitFully featured, fully customisable static site generation for SolidStart
Community
github