you can do possibly Make an "ErrorLogs" Class ,Keep "Status" Field in it , and the Error Exception in "Message" Field , if there occurs any error send status to failed
In both Cases return a Class Which has both Error Logs and and Integer Value, if there is error Return Integer as -1 and handle it on Client