Skip to content

Commit

Permalink
feat(Android): Expose error code (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjanvanmaren committed Mar 8, 2021
1 parent cd65c47 commit fcaf8fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions android/src/main/java/com/wenkesj/voice/VoiceModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public void onError(int errorCode) {
String errorMessage = String.format("%d/%s", errorCode, getErrorText(errorCode));
WritableMap error = Arguments.createMap();
error.putString("message", errorMessage);
error.putString("code", String.valueOf(errorCode));
WritableMap event = Arguments.createMap();
event.putMap("error", error);
sendEvent("onSpeechError", event);
Expand Down

0 comments on commit fcaf8fe

Please sign in to comment.