# report log for error message

**URL:** <https://community.zeek.org/t/report-log-for-error-message/3219>\
**Category:** Zeek\
**Created:** [August 8, 2014, 12:51pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219 "2014-08-08T12:51:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhai\_Jim\_MGS](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zhai\_Jim\_MGS](https://community.zeek.org/u/Zhai_Jim_MGS)\
**Post date:** [August 8, 2014, 12:51pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219/1 "2014-08-08T12:51:08Z")

</div>

Got a lot of ERROR in report log for the smtp. "....Reporter::ERROR field value missing [SMTPurl::c$smtp$from] ....." Is that some way to ignore this record?

-Jim

---

<div class="post-metadata">

**Author:** ![Hosom\_Stephen\_M](https://avatars.discourse-cdn.com/v4/letter/h/d26b3c/32.png) [@Hosom\_Stephen\_M](https://community.zeek.org/u/Hosom_Stephen_M)\
**Post date:** [August 8, 2014, 12:55pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219/2 "2014-08-08T12:55:08Z")

</div>

Jim,

It's normally best to prevent these errors by checking to determine if the value exists before using it.

For example:

&nbsp;&nbsp;if ( c$smtp?$from )  
&nbsp;&nbsp;&nbsp;&nbsp;## do stuff

Lots of errors within Bro scripts can cause some pretty interesting problems with your cluster.

---

<div class="post-metadata">

**Author:** ![Zhai\_Jim\_MGS](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zhai\_Jim\_MGS](https://community.zeek.org/u/Zhai_Jim_MGS)\
**Post date:** [August 8, 2014, 12:56pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219/3 "2014-08-08T12:56:20Z")

</div>

Great Thanks,  
-Jim

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [August 8, 2014, 12:56pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219/4 "2014-08-08T12:56:40Z")

</div>

In your scripts, you can (and should) check the existence of optional values (like from in smtp) using the ?$ operator.

In this case, if c$smtp?$from returns true, the field is set and you can access it.

Johanna

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:41pm UTC](https://community.zeek.org/t/report-log-for-error-message/3219/5 "2022-05-06T15:41:58Z")

</div>


