Closed ggalmazor closed 4 years ago
Hi I will gladly help out and make PR later today..
Hi @florian42!
That would be perfect, thanks!
Please, let me know if you need help. I'm around at our #briefcase-code channel at Slack
I'll try to provide you with a form and submissions that would reproduce the issue
@florian42, I've attached a zip with a form&submissions that will reproduce the issue when pushed to a Central server. If don't have access to a Central server, send me an email to ggalmazor@gmail.com and I'll create a user for you in the sandbox server.
Hello @florian42, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 15 days.
You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim
on that issue.
Thanks for your contributions, and hope to see you again soon!
Problem description
A log entry is created every time Briefcase receives a non-success response from Central while pulling or pushing forms. This log entry includes information about the error thanks to a JSON object Central encodes in its responses.
Right now, we're parsing the JSON and storing the message in a
CentralErrorMessage
class, which gets interpolated into the log entry text. Since the class is missing thetoString()
method, the log entry doesn't include anything useful for users trying to know why an interaction with Central failed.Example log file:
Steps to reproduce the problem
Expected behavior
The log file should include the message Central sends back with the 4xx HTTP response.
Example:
Other information
The
CentralErrorMessage
was created to store more information about the error, but currently is storing just a message string, which feels silly and overcomplicated.A simpler solution could involve deleting the class and making
PushToCentralTracker.parseErrorResponse()
return just the string to be interpolated. We can always recover this class in case we need any of the other data Central includes in the JSON error details.