Skip to content

Add handling of error scenarios for github connect action #790

@begedin

Description

@begedin

Problem

The action defined in #788 calls the function defined in #789, but only deals with the successful response, which is an {:ok, user}.

Thanks to ja_resource, it will also successfully deal with an {:error, changeset} response, but we should still test for this scenario on the controller level.

Lastly, it does not know how to handle an {:error, HTTPoison.ErrorResponse} response, so we should handle that by rendering a 500, and write a test for that.

Subtasks

  • Write user controller test for the {:error, changeset} case
  • Write handling for the {:error, HTTPoison.ErrorResponse} case
  • Write test for the {:error, HTTPoison.ErrorResponse} case

References

Blocked by: #788, #789

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions