maybe worth using the local `server_error` helper function here?