# Workers - Preserve exception details in console logs

Publisher-attributed story with a reviewed brief or permitted publisher paragraph. The original publisher is responsible for the linked reporting.

- Publisher: Cloudflare Developers
- Category: Cloud
- Original publication time: 2026-08-24T00:00:00Z
- First observed by NexusTechWire: 2026-10-01T15:54:33Z
- Original source: https://developers.cloudflare.com/changelog/post/2026-08-24-preserve-exception-info/
- NexusTechWire record: https://nexustechwire.com/news/news-fdf09e3b958d44061824

## From the publisher

Console methods now preserve exception details in your Worker's logs. When your Worker logs an exception, the corresponding log entry includes the exception name, message, and stack. For example, your Worker can catch and log an exception: try \{ throw new Error("Deliberately created exception"); \} catch (error) \{ console.error("caught exception:", error); \} try \{ throw new Error("Deliberately created exception"); \} catch (error) \{ console.error("caught exception:", error); \} If you use Workers Observability, your log is automatically enriched with structured error information. The following example shows how the enriched log appears in the Cloudflare dashboard: The exception's stack trace appears directly in the log message.

Source license: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Publisher excerpt shortened and converted to plain text. Original source license applies.

Read the full original: [Cloudflare Developers](https://developers.cloudflare.com/changelog/post/2026-08-24-preserve-exception-info/)

This record does not reproduce the complete article or represent independent confirmation of every source claim.
