Guest User

Untitled

a guest
Jul 25th, 2022
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 KB | None | 0 0
  1. //1st request to endpoint
  2. REQUEST[POST] => PATH: https://PATH-TO-ORIGINAL-REQUEST | DATA => {} | JWT => {Content-type: application/json, Authorization: Bearer MY-EXPIRED-TOKEN}
  3.  
  4. //jwt expired, call to refresh endpoint
  5. REQUEST[POST] => PATH: https://PATH-TO-REFRESH-TOKEN | DATA => {refresh_token: REFRESH-TOKEN, grant_type: refresh_token} | JWT => {Content-type: application/json, Authorization: Bearer TOKEN}
  6.  
  7. //successful refresh
  8. RESPONSE[200] => PATH: https://PATH-TO-REFRESH-TOKEN | DATA => {access_token: NEW-JWT-TOKEN, response_message: success_default}
  9.  
  10. //2nd request to original endpoint
  11. REQUEST[POST] => PATH: https://PATH-TO-ORIGINAL-REQUEST | DATA => {} | JWT => {Content-type: application/json, Authorization: Bearer NEW-JWT-TOKEN}
  12.  
  13. //successful response
  14. RESPONSE[200] => PATH: https://PATH-TO-ORIGINAL-REQUEST | DATA => { RESPONSE DATA}
  15.  
  16. //error response
  17. ERROR[401] => PATH: https://PATH-TO-ORIGINAL-REQUEST | SENT_DATA => {} | RECEIVED_DATA => {response_message: autenticator_errors_invalid_token_expired}
  18. Error: Bad state: Future already completed
  19. at Object.throw_ [as throw] (http://localhost:50182/dart_sdk.js:5405:11)
  20. at _AsyncCompleter.new.completeError (http://localhost:50182/dart_sdk.js:37318:62)
  21. at dio_mixin.ErrorInterceptorHandler.new.next (http://localhost:50182/packages/dio/src/interceptors/log.dart.lib.js:2138:24)
  22. at custom_interceptors.CustomInterceptor.new.onError (http://localhost:50182/packages/dio/src/interceptors/log.dart.lib.js:458:22)
  23. at [onError] (http://localhost:50182/packages/flutterApp/repository/dio/custom_interceptors.dart.lib.js:65:20)
  24. at custom_interceptors.CustomInterceptor.new.onError$ (http://localhost:50182/packages/flutterApp/repository/dio/custom_interceptors.dart.lib.js:55:29)
  25. at onError$.next (<anonymous>)
  26. at runBody (http://localhost:50182/dart_sdk.js:43083:34)
  27. at Object._async [as async] (http://localhost:50182/dart_sdk.js:43114:7)
  28. at custom_interceptors.CustomInterceptor.new.onError (http://localhost:50182/packages/flutterApp/repository/dio/custom_interceptors.dart.lib.js:52:20)
  29. at [onError] (http://localhost:50182/packages/flutterApp/repository/dio/custom_interceptors.dart.lib.js:137:20)
  30. at custom_interceptors.CustomInterceptor.new.onError (http://localhost:50182/packages/flutterApp/repository/dio/custom_interceptors.dart.lib.js:117:34)
  31. at onError.next (<anonymous>)
  32. at http://localhost:50182/dart_sdk.js:43063:33
  33. at _RootZone.runUnary (http://localhost:50182/dart_sdk.js:42919:58)
  34. at _FutureListener.thenAwait.handleValue (http://localhost:50182/dart_sdk.js:37493:29)
  35. at handleValueCallback (http://localhost:50182/dart_sdk.js:38088:49)
  36. at _Future._propagateToListeners (http://localhost:50182/dart_sdk.js:38126:17)
  37. at [_complete] (http://localhost:50182/dart_sdk.js:37947:25)
  38. at _SyncCompleter.new.complete (http://localhost:50182/dart_sdk.js:37401:31)
  39. at onValue (http://localhost:50182/dart_sdk.js:37154:60)
  40. at _RootZone.runUnary (http://localhost:50182/dart_sdk.js:42919:58)
  41. at _FutureListener.then.handleValue (http://localhost:50182/dart_sdk.js:37493:29)
  42. at handleValueCallback (http://localhost:50182/dart_sdk.js:38088:49)
  43. at _Future._propagateToListeners (http://localhost:50182/dart_sdk.js:38126:17)
  44. at [_completeWithValue] (http://localhost:50182/dart_sdk.js:37955:23)
  45. at async._AsyncCallbackEntry.new.callback (http://localhost:50182/dart_sdk.js:37991:35)
  46. at Object._microtaskLoop (http://localhost:50182/dart_sdk.js:43223:13)
  47. at _startMicrotaskLoop (http://localhost:50182/dart_sdk.js:43229:13)
  48. at http://localhost:50182/dart_sdk.js:38359:9
  49.  
  50. new page initState successful request + response
  51. REQUEST[POST] => PATH: https://FURTHER-REQUEST | DATA => {} | JWT => {Content-type: application/json, Authorization: Bearer NEW-JWT-TOKEN}
  52. RESPONSE[200] => PATH: https://FURTHER-REQUEST | DATA => { SUCCESSFUL RESPONSE BODY
  53.  
Advertisement
Add Comment
Please, Sign In to add comment