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: function :function_clause.__struct__/0 is undefined #43

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

fuelen
Copy link
Contributor

@fuelen fuelen commented Jan 28, 2021

This error happens when exception is raised from absinthe

[error] Task #PID<0.3034.0> started from SpandexDatadog.ApiServer terminating
** (UndefinedFunctionError) function :function_clause.__struct__/0 is undefined (module :function_clause is not available)
    :function_clause.__struct__()
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:271: SpandexDatadog.ApiServer.add_error_type/2
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:264: SpandexDatadog.ApiServer.add_error_data/2
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:244: SpandexDatadog.ApiServer.meta/1
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:230: SpandexDatadog.ApiServer.format/3
    (elixir 1.11.2) lib/enum.ex:1399: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.11.2) lib/enum.ex:1399: Enum."-map/2-lists^map/1-0-"/2
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:196: SpandexDatadog.ApiServer.send_and_log/2
    (spandex_datadog 1.0.0) lib/spandex_datadog/api_server.ex:172: anonymous fn/3 in SpandexDatadog.ApiServer.handle_call/3
    (elixir 1.11.2) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Function: #Function<14.89247124/0 in SpandexDatadog.ApiServer.handle_call/3>
    Args: []

This error happens when exception is raised from absinthe
@sourcelevel-bot
Copy link

Hello, @fuelen! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

Copy link
Member

@GregMefford GregMefford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out! I have a small tweak that I want to make to this, but I'll just add a commit to this branch and then merge it. ❤️ 🚀

@GregMefford
Copy link
Member

Hm, it looks like I can't push to this branch on your fork for some reason. No problem! I'll just merge this and separately push the new commits in another PR. Thanks again! 🚀

@GregMefford GregMefford merged commit 4f86c52 into spandex-project:master Feb 6, 2021
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

Successfully merging this pull request may close these issues.

2 participants