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

Fix error response for adapter_failure #72

Closed
miike opened this issue Aug 21, 2021 · 1 comment
Closed

Fix error response for adapter_failure #72

miike opened this issue Aug 21, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@miike
Copy link
Contributor

miike commented Aug 21, 2021

Describe the bug
A clear and concise description of what the bug is.

In certain instances a Scala object (AdapterFailure) is returned rather than the expected bad rows JSON.

To Reproduce
Steps to reproduce the behavior or code snippets that produce the issue.

  1. Spin up Micro
  2. curl -X GET http://localhost:9090/i
  3. curl -X GET http://localhost:9090/micro/bad

Expected behavior
A clear and concise description of what you expected to happen.

The bad JSON response should contain an error response that contains a failed event with iglu:com.snowplowanalytics.snowplow.badrows/adapter_failures/jsonschema/1-0-0.

Screenshots

Instead a AdapterFailures is returned as a string as part of the JSON payload - rather than the failed event JSON.

"errors":["Error while extracting event(s) from collector payload and validating it/them.","AdapterFailures(Processor(snowplow-micro,1.1.3-rc4.dev.1),AdapterFailures(2021-08-21T04:11:49.049128Z,com.snowplowanalytics.snowplow,tp1,NonEmptyList(InputData(querystring,None,empty querystring: not a valid URI redirect))),CollectorPayload(com.snowplowanalytics.snowplow,tp1,List(),None,None,ssc-2.3.0-stdout$,UTF-8,Some(localhost),Some(2021-08-21T04:11:49.014Z),Some(172.17.0.1),Some(Mozilla/5.0),None,List(Timeout-Access: <function1>, Host: localhost:9090, Connection: keep-alive, s...),Some(041a959b-63d1-4eb4-a851-83833e407470)))"]}]
@miike miike added the bug Something isn't working label Aug 21, 2021
@adatzer
Copy link
Contributor

adatzer commented Aug 25, 2021

Hello @miike and thank you for raising this issue!

Through it, we've been thinking about how Micro's bad row output could be improved in general.
So, even though we will address this present issue in the coming release, it can be considered as only a partial fix to that broader issue (which is probably for a v2 release as a breaking API change).
It would be great if you could share your ideas about it or any particular use cases you have in mind!

@adatzer adatzer changed the title Scala object returned rather than JSON for adapter failure Fix error response for adapter_failure Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants