Skip to content

crud: support operation_data field in errors #331

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

askalt
Copy link

@askalt askalt commented Aug 21, 2023

This patch adds operation_data decoding for the crud.Error.

The operation_data type is determined as rowType in crud.Result.

Also, according to [1], an error can contain one of the following:

  • an error
  • an array of errors
  • nil

So the error decoding logic has been modified to consider each case, in order to avoid comparing an error to nil.

  1. https://github.com/tarantool/crud/tree/master#api

I didn't forget about (remove if it is not applicable):

Closes #330

@askalt askalt force-pushed the askalt/gh-330-support-operation-data branch 2 times, most recently from 45514fc to 5cd7534 Compare August 22, 2023 07:12
@askalt askalt force-pushed the askalt/gh-330-support-operation-data branch 3 times, most recently from fb1345a to adc116f Compare August 22, 2023 19:02
@askalt askalt force-pushed the askalt/gh-330-support-operation-data branch from adc116f to 7ce2007 Compare August 23, 2023 07:24
This patch adds `operation_data` decoding for the `crud.Error`.

The `operation_data` type is determined as `rowType` in `crud.Result`.

Also, according to [1], an error can contain one of the following:
- an error
- an array of errors
- nil

So the error decoding logic has been modified to consider each case,
in order to avoid comparing an error to nil.

1. https://github.com/tarantool/crud/tree/master#api

Closes #330
@oleg-jukovec oleg-jukovec merged commit d8df65d into master Aug 23, 2023
@oleg-jukovec oleg-jukovec deleted the askalt/gh-330-support-operation-data branch August 23, 2023 07:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crud: support operation_data in errors
3 participants