dexter has uploaded this change for review.
es9p_client: use atom undefinedError instead of 127
The error code fixed in this patch is passed 1:1 to the REST API.
When we put the integer value, the integer becomes visible on the
REST API as it is. This means the REST API user gets the number
127 in the result field, where normally should appear the error
code as a string.
So let's use the atom undefinedError instead of the integer value
so that the REST API user gets the string "undefinedError" instead
of the number 127.
Related: SYS#8203
Change-Id: I70ee698a73a7e57d6818a606b0af81ef455e4348
---
M src/es9p_client.erl
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/17/43817/1
diff --git a/src/es9p_client.erl b/src/es9p_client.erl
index 13ca93b..47c9bd4 100644
--- a/src/es9p_client.erl
+++ b/src/es9p_client.erl
@@ -218,7 +218,7 @@
},
{initiateAuthenticationOk, R};
_ ->
- {initiateAuthenticationError, 127}
+ {initiateAuthenticationError, undefinedError}
% TODO: At the moment we only react on "Executed-Success", we should also react on the other status
% codes and return an apropriate tuple (in JSON the concept of xyzOk/xyzError members
% like we have it in the ASN.1 definition seems not to exist), see also SGP.22, section 6.5.1.4.
@@ -268,7 +268,7 @@
},
{authenticateClientOk, R};
_ ->
- {authenticateClientError, 127}
+ {authenticateClientError, undefinedError}
% TODO: (see above)
end,
{authenticateClientResponseEs9, Choice};
@@ -300,7 +300,7 @@
},
{getBoundProfilePackageOk, R};
_ ->
- {getBoundProfilePackageError, 127}
+ {getBoundProfilePackageError, undefinedError}
% TODO: (see above)
end,
{getBoundProfilePackageResponse, Choice};
@@ -325,7 +325,7 @@
% This function has no output data
{cancelSessionOk, none};
_ ->
- {cancelSessionError, 127}
+ {cancelSessionError, undefinedError}
% TODO: (see above)
end,
{cancelSessionResponseEs9, Choice};
To view, visit change 43817. To unsubscribe, or for help writing mail filters, visit settings.