Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code 'forwarding' #509

Closed
gkc opened this issue Feb 11, 2022 · 8 comments · Fixed by #850
Closed

Error code 'forwarding' #509

gkc opened this issue Feb 11, 2022 · 8 comments · Fixed by #850
Assignees
Labels
0 SP No SP's assigned bug Something isn't working PR42 Jul 2022 Sprint Planning PR43 Aug 2022 Sprint Planning PR44 Aug 2022 Sprint Planning PR45 Aug | Sept 2022 Sprint Planning PR46 PR47 PR48

Comments

@gkc
Copy link
Contributor

gkc commented Feb 11, 2022

Describe the bug

  • In the case where a client makes a request to server A, and an exception is thrown in server A because of an error response from server B, we should try to preserve error codes where they make sense in the response to the ultimate client
    • For example: Client calls plookup on Server A; Server A calls lookup on Server B; server B returns "error:AT0015-Key not found : ..."
    @sitaram@lookup:phone@murali
    error:null-null : Request to remote secondary @murali at vip.ve.atsign.zone:7001 received error
      response 'error:AT0015-key not found : @sitaram:phone@murali does not exist in keystore'
    

Expected behaviour

  • When returning to the client we would like to preserve that AT0015 (key not found) as it is most correct, but provide the additional context of the full error message from the other end. For example:
   @sitaram@lookup:phone@murali
   error:AT0015-key not found : Request to remote secondary @murali at vip.ve.atsign.zone:7001 received error
     response 'error:AT0015-key not found : @sitaram:phone@murali does not exist in keystore'
  • This can be achieved in outbound_message_listener, for example, by having it
    • When there's an error code from remote server, inspect it and match it to its corresponding AtException
      • If there is a matching Exception then throw that, adding the entire message received from remote
      • Else do what's being done now (throw AtConnectException)
  • Consider extending at_commons error_message.dart with a way to create (not throw, just create) the correct exception given an error code. (We currently have mapping from exception to error-code but not the other way around)
@gkc
Copy link
Contributor Author

gkc commented Feb 11, 2022

@kalluriramkumar As per our discussion. If you want to pick this one up, please assign yourself and go ahead!

@ksanty ksanty added 5 SP 5 Story Points - 3 Days Medium PR42 Jul 2022 Sprint Planning labels Jul 26, 2022
@sitaram-kalluri
Copy link
Member

sitaram-kalluri commented Aug 8, 2022

The changes are completed in the following PR: #841

Spent 5 SP and carry forward to update the unit tests. Adding 3 SP to rewrite the tests as mentioned the PR

@ksanty ksanty added 3 SP 3 Story Points - 1 Day Small PR43 Aug 2022 Sprint Planning labels Aug 9, 2022
@murali-shris murali-shris added 0 SP No SP's assigned PR44 Aug 2022 Sprint Planning labels Aug 22, 2022
@murali-shris
Copy link
Member

Dependent issue
#691

@murali-shris murali-shris removed the 3 SP 3 Story Points - 1 Day Small label Aug 22, 2022
@sitaram-kalluri sitaram-kalluri removed the 0 SP No SP's assigned label Sep 6, 2022
@ksanty ksanty added PR45 Aug | Sept 2022 Sprint Planning 3 SP 3 Story Points - 1 Day Small labels Sep 6, 2022
@sitaram-kalluri
Copy link
Member

The changes are merged to trunk branch: json_encode_error_message

@gkc
Copy link
Contributor Author

gkc commented Sep 19, 2022

@kalluriramkumar is this ticket complete, should it be closed?

@sitaram-kalluri
Copy link
Member

sitaram-kalluri commented Sep 19, 2022

@gkc : The changes are yet to released into canary. Hence the ticket is open.

Currently facing issue in releasing code to canary. Following is the issue:

Run sed -i '0,/version/ s/version\:.*/&+${GITHUB_REF#refs/tags/}/' pubspec.yaml
  sed -i '0,/version/ s/version\:.*/&+${GITHUB_REF#refs/tags/}/' pubspec.yaml
  shell: /usr/bin/bash -e {0}
  env:
    working-directory: at_server
    VERSION: c3.0.[2](https://github.com/atsign-foundation/at_server/actions/runs/3082036906/jobs/4981321618#step:4:2)[3](https://github.com/atsign-foundation/at_server/actions/runs/3082036906/jobs/4981321618#step:4:3)c
sed: -e expression #1, char [4](https://github.com/atsign-foundation/at_server/actions/runs/3082036906/jobs/4981321618#step:4:4)[7](https://github.com/atsign-foundation/at_server/actions/runs/3082036906/jobs/4981321618#step:4:8): unknown option to `s'

The same command works fine in e2e_test_prep action.

The reason we did this change is because, we have version package added in pubspec.yaml in at_secondary_server. So when updating the version of at_secondary_server, the version of the version package is also getting updated causing the dart pub get to fail. The fix I did is look for first occurrence of version and then append the github action's run number.

Link to github actions run: https://github.com/atsign-foundation/at_server/actions/runs/3082036906/jobs/4981321618

@ksanty ksanty added the PR46 label Sep 19, 2022
@sitaram-kalluri
Copy link
Member

The changes are related to canary servers in v3.0.23

@sitaram-kalluri sitaram-kalluri added 0 SP No SP's assigned and removed 3 SP 3 Story Points - 1 Day Small labels Oct 3, 2022
@ksanty ksanty added the PR47 label Oct 3, 2022
@ksanty ksanty added the PR48 label Oct 18, 2022
@sitaram-kalluri
Copy link
Member

The changes are released to production. Hence closing the git issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 SP No SP's assigned bug Something isn't working PR42 Jul 2022 Sprint Planning PR43 Aug 2022 Sprint Planning PR44 Aug 2022 Sprint Planning PR45 Aug | Sept 2022 Sprint Planning PR46 PR47 PR48
Projects
None yet
4 participants