Two server requests in one file, fails in production
Answered
Blanc de Hotot posted this in #help-forum
Blanc de HototOP
If i make two server requests in one component, one of the requests fails in production for some reason and I get this message. Works perfectly fine locally
here's the code
Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.here's the code
export default async function ContactInformation() {
const records = (await getRecords()).filter(
(record) => record.section === Section.ContactInformation
);
const prices = await getPricing();
return (
<>
<ContactInformationForm records={records} pricing={prices} />
</>
);
}Answered by Blanc de Hotot
Welp.. merged into prod, issue no longer appearing. I didn't change anything. Super weird.
5 Replies
Giant panda
Check the server logs to see the error that happened during rendering.
Blanc de HototOP
Ah, well this is odd. I had to revert it from production
The preview link or local doesn't generate same error – I'm not sure how to get server logs then
it only happens on prod
The preview link or local doesn't generate same error – I'm not sure how to get server logs then
it only happens on prod
Giant panda
There is a Logs tab on Vercel
Blanc de HototOP
yeah but max 1 hour so it's gone
brb, making a dummy project / repo to reprod
brb, making a dummy project / repo to reprod
Blanc de HototOP
Welp.. merged into prod, issue no longer appearing. I didn't change anything. Super weird.
Answer