TechnionYP5777 / Bugquery

Bug query
9 stars 1 forks source link

Checks on user input #59

Closed Amit-Oha closed 7 years ago

Amit-Oha commented 7 years ago

Check legality of user input - is this a stack trace? could we find the exception? could we retrieve (enough) results for this query? etc. For example, at the moment we get an assertion error when we can't find enough related posts.

ZivIzhar commented 7 years ago

That's a really generic issue, isn't it? you cant say that it's measured by something specific o;

Amit-Oha commented 7 years ago

I agree, and that's why it is in backlog. If and when someone takes responsibility for this, he could state what part of this he implemented and maybe update whats left

yonzarecki commented 7 years ago

@rodedzats and myself will take this issue. I think what we'll do is just check the input better and return a special value (or nothing) in case of an error. Which do you prefer ? @AmitOhayon

yosefraisman commented 7 years ago

Maybe define a new exception type and throw? @yonzarecki

rodedzats commented 7 years ago

@yosefraisman @AmitOhayon I've changed getMostRelevantPosts function to throw InvalidStackTraceException if the stacktrace which the user provides is illegal. That's on my and @yonzarecki side. I've also changed SearchController to throw InternalServerException if the stack trace is illegal, perhaps it's better to throw something else but I didn't want to mess with your file too much.

yonzarecki commented 7 years ago

Looks like @rodedzats finished this issue, closing.

93