Skip to content

Commit cb9f3fd

Browse files
committed
Error resitant
1 parent fe6fd10 commit cb9f3fd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/nextjs-app/app/[lang]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ export default function Page({ params } : PageProps) {
181181
<a
182182
href={`/${course.idioma}${course.prefijoRuta}`} >
183183
<div className="img-course">
184-
<Image
184+
{course.imagen && course.imagen[0] == "/" && <Image
185185
className="w-full h-[17rem] pt-2 object-cover"
186186
src={course.imagen}
187187
alt={course.titulo}
188188
width={680}
189189
height={272}
190-
/>
190+
/>}
191191
</div>
192192
<div className="p-5">
193193
<h3 className="text-lg font-semibold text-gray-800 mb-2">{course.titulo}</h3>

packages/nextjs-app/app/api/check_crossword/route.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,12 @@ export async function POST(req: NextRequest) {
210210
)
211211
} catch (error) {
212212
console.error("Excepción error=", error)
213+
const sError = JSON.stringify(
214+
data,
215+
(key, value) => typeof value === 'bigint' ? value.toString() + 'n' : value
216+
);
213217
return NextResponse.json(
214-
{error: error},
218+
{error: sError},
215219
{status: 500}
216220
)
217221
}

0 commit comments

Comments
 (0)