errbit icon indicating copy to clipboard operation
errbit copied to clipboard

Missing file field leads to exception

Open drexin opened this issue 15 years ago • 4 comments

Hi,

when a stacktrace is for whatever reason missing a file for a stack trace element the message still gets stored in the db and leads to an exception when rendering the view. I think the correct behaviour would be either to set a default value for the file field, like "unknown source" or to reject the message.

drexin avatar Aug 09 '11 10:08 drexin

Hello.

What's the reason of missing file attribute? Airbrake API says:

/notice/error/backtrace/line

Required. This element can occur more than once. Each line element describes one code location or frame in the backtrace when the error occurred, and requires @file and @number attributes. If the location includes a method or function, the @method attribute should be used.

So @file attribute is required unless client passes @method attribute. Is this you case?

The issue should be fixed, I'm just trying to figure out the it's cause.

oruen avatar Aug 09 '11 10:08 oruen

Yes, the @method attribute was set.

drexin avatar Aug 09 '11 10:08 drexin

Hi drexin, thanks for your bug report. I have fixed this and pushed the code, so please update your Errbit instance and make sure that it works for your case.

ndbroadbent avatar Aug 09 '11 10:08 ndbroadbent

Hi, it seems to work. Thank you for fixing this so fast.

drexin avatar Aug 09 '11 13:08 drexin