Open ragesoss opened 5 years ago
Hello I am current outreachy applicant and wants to work on this issue, please know the steps to reproduce this in my local
@ragesoss : if we check suspected_diffs.present?
then this mentioned error can be avoided; incase if suspected_diffs
is not present then what the method has to return?
Something like that seems reasonable, although if there's anywhere earlier in the data flow to handle this failure mode, that would be better.
A patch for this should also include a test for a mocked query that would lead to this error.
@ragesoss in api_get
method of PlagiabotImporter class if we check if response is present then it would be better, but if response is not present then what the method has to return?
Something like that seems reasonable, although if there's anywhere earlier in the data flow to handle this failure mode, that would be better.
A patch for this should also include a test for a mocked query that would lead to this error.
@ragesoss where should I write the test for the mocked query? in which file?
Probably plagiabot_importer_spec.rb
@ragesoss : My understanding is that api_get
method returns nil in the find_recent_plagiarism
method , but i am not sure how to reproduce this error?please share the Steps to reproduce this behavior
@Aeropio I think it will be easiest to just build the test so that the Net::HTTP.get
returns nil
. I think the problem at the moment is we're not entirely sure what yet is causing the return of nil
but still want to be able to handle it.
@bwreid okay sure
https://sentry2.wikiedu.org/wikiedu/p-e-dashboard/issues/2602/