File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
aws-core/src/main/java/com/amplifyframework/auth
aws-predictions/src/main/java/com/amplifyframework/predictions/aws/http
core/src/main/java/com/amplifyframework Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ open class CognitoCredentialsProvider @InternalAmplifyApi constructor(
4747 AuthException (
4848 " Failed to get credentials. " +
4949 " Check if you are signed in and configured identity pools correctly." ,
50- AmplifyException .TODO_RECOVERY_SUGGESTION
50+ AmplifyException .TODO_RECOVERY_SUGGESTION ,
51+ authSession.toAWSAuthSession()?.awsCredentialsResult?.error
5152 )
5253 )
5354 },
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ internal class LivenessWebSocket(
254254 PredictionsException (
255255 " Failed to start the face liveness session." ,
256256 error,
257- AmplifyException .TODO_RECOVERY_SUGGESTION
257+ AmplifyException .RECOVERY_SUGGESTION_WITH_THROWABLE
258258 )
259259 )
260260 }
Original file line number Diff line number Diff line change 1919import androidx .annotation .Nullable ;
2020import androidx .core .util .ObjectsCompat ;
2121
22+ import com .amplifyframework .annotations .InternalAmplifyApi ;
23+
2224import java .util .Objects ;
2325
2426/**
@@ -29,7 +31,13 @@ public class AmplifyException extends Exception {
2931 * All Amplify Exceptions should have a recovery suggestion. This string can be used as a filler until one is
3032 * defined but should ultimately be replaced.
3133 */
32- public static final String TODO_RECOVERY_SUGGESTION = "Sorry, we don't have a suggested fix for this error yet." ;
34+ public static final String TODO_RECOVERY_SUGGESTION = "Sorry, we don’t have a recovery suggestion for this error." ;
35+
36+ /**
37+ * This string is intended for internal use only.
38+ */
39+ @ InternalAmplifyApi
40+ public static final String RECOVERY_SUGGESTION_WITH_THROWABLE = "See the attached exception for more details" ;
3341
3442 /**
3543 * A common recovery suggestion for errors that are unexpected and could be originated from a bug.
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ open class UnknownException(
3131) {
3232 companion object {
3333 const val RECOVERY_SUGGESTION_WITH_THROWABLE = " See the attached exception for more details"
34- const val RECOVERY_SUGGESTION_WITHOUT_THROWABLE = " Sorry, we don' t have a suggested fix for this error yet ."
34+ const val RECOVERY_SUGGESTION_WITHOUT_THROWABLE = " Sorry, we don’ t have a recovery suggestion for this error."
3535 }
3636}
You can’t perform that action at this time.
0 commit comments