Skip to content

Commit 3758f6f

Browse files
committed
added_parser_for_error_message_but_with_unauthenticated_issue
1 parent 0f3d286 commit 3758f6f

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

sheets/test/application_flow.e

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ feature {NONE} -- Initialization
7272
api_service: OAUTH_SERVICE_I
7373
file: FILE
7474
do
75+
7576
check
7677
attached api_key as l_api_key
7778
attached api_secret as l_api_secret
7879
then
80+
print ("get_token_from_url-> api_key:'" + l_api_key + "' secret:'" + l_api_secret + "'" )
7981
create Result.make_empty
8082
create config.make_default (l_api_key, l_api_secret)
8183
config.set_callback ("urn:ietf:wg:oauth:2.0:oob")
@@ -124,6 +126,7 @@ feature {NONE} -- Initialization
124126
attached api_key as l_api_key
125127
attached api_secret as l_api_secret
126128
then
129+
print ("refresh_access_token-> api_key:'" + l_api_key + "' secret:'" + l_api_secret + "'" )
127130
create Result.make_empty
128131
create google
129132
create request.make ("POST", google.access_token_endpoint )
@@ -241,4 +244,6 @@ feature {NONE} -- Implementation
241244
api_key: detachable STRING
242245
api_secret: detachable STRING
243246
empty_token: detachable OAUTH_TOKEN
247+
248+
244249
end

sheets/test/test_sheets_api.e

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,21 @@ feature -- Tests
2727

2828
test_create_sheet
2929
local
30-
esapi: EG_SHEETS_API
30+
l_esapi: EG_SHEETS_API
3131
do
32-
create esapi.make (last_token.token)
33-
if attached esapi.create_spreedsheet as l_spreedsheet then
34-
if esapi.has_error then
32+
-- https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets
33+
create l_esapi.make (last_token.token)
34+
if attached l_esapi.create_spreedsheet as l_spreedsheet then
35+
if l_esapi.has_error then
3536
-- debug ("test_create_sheet")
36-
print ("Error: test_create_sheet %N" )
37-
print ("Error: " + esapi.error_message)
37+
print ("test_create_sheet-> Error %N" )
38+
print ("test_create_sheet-> Error: msg:" + l_esapi.error_message)
39+
print ("test_create_sheet-> See codes here: https://developers.google.com/maps-booking/reference/rest-api-v3/status_codes")
3840
print ("%N")
3941
-- end
40-
check cannot_create_the_spreedsheet: False end
42+
check
43+
cannot_create_the_spreedsheet: False
44+
end
4145
else
4246
check Json_Field_spreadsheetId: l_spreedsheet.has_substring ("spreadsheetId") end
4347
check Json_Field_properties: l_spreedsheet.has_substring ("properties") end
@@ -58,9 +62,9 @@ feature -- Tests
5862

5963
test_create_sheet_json
6064
local
61-
esapi: EG_SHEETS_JSON
65+
l_esapi: EG_SHEETS_JSON
6266
do
63-
create esapi.make (last_token.token)
67+
create l_esapi.make (last_token.token)
6468
end
6569

6670
end

0 commit comments

Comments
 (0)