Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(enrollment): improve error message
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Hernandez <rhernandez@teclib.com>
  • Loading branch information
rafaelje authored and Hector Rondon committed Apr 18, 2018
1 parent 367758f commit 64293c8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import android.os.Handler;
import android.os.Looper;

import org.flyve.mdm.agent.R;
import org.flyve.mdm.agent.core.Routes;
import org.flyve.mdm.agent.data.MqttData;
import org.flyve.mdm.agent.security.AndroidCryptoProvider;
Expand Down Expand Up @@ -87,7 +86,7 @@ private String manageError(String error) {
if(error.contains("EXCEPTION_HTTP") || error.contains("ERROR")) {
FlyveLog.e(error);

errorMessage = context.getResources().getString(R.string.ERROR_INTERNAL);
errorMessage = error;

if(error.contains("EXCEPTION_HTTP")) {
return errorMessage;
Expand Down Expand Up @@ -186,7 +185,7 @@ public void run() {
FlyveLog.e(ex.getMessage());
EnrollmentHelper.runOnUI(new Runnable() {
public void run() {
callback.onError(context.getResources().getString(R.string.ERROR_INTERNAL));
callback.onError(ex.getMessage());
}
});
}
Expand Down

0 comments on commit 64293c8

Please sign in to comment.