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

Investigate feasibility of making service_type optional in Update #96

Open
james-rae opened this issue May 31, 2018 · 1 comment
Open
Assignees

Comments

@james-rae
Copy link
Member

the /update endpoint requires a service type to be provided. Joost has suggested to make this optional, as you may not remember what was used.

The original request is stored internally in the couchDB, so it should be retrievable inside the update command.

Investigate:

  • that the above idea will actually work
  • if there are any problematic situations that arise
  • what kind of error handling is required if someone attempts to update a URL that points to a service that does not match the original service_type
  • amount of effort to make the change.
@barryytm
Copy link
Collaborator

barryytm commented Jun 4, 2018

Here is the conclusion to my investigation

  • The idea of making update optional should work. What update does is to update the payload type then using it to reconstruct a layer node to replace the existing one but still being mapped by the same registered key (evidence).
  • Theoretically, the possible problematic situations should also be a subset of the possible problematic situations register has. If there is a problem occurs that is not in that subset, then it will most likely occur in the logic of update.
  • Since the idea of update is basically to reconstruct a new layer node under the same key. The error handling should be somewhat similar to register excluding all the key mapping related errors.
  • It shouldn't take long to make the change but might require some extensive testings once implemented.

Feel free to comment on my findings and please do correct me if anything I said above is untrue or doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants