DEV Community

Discussion on: Use opaque types in Elm!

Collapse
 
perty profile image
Per Lundholm

Great post. I was wondering about the use of Http.Error. Why are you using that when creating a Question, it has nothing to do with Http?

Collapse
 
hecrj profile image
Héctor Ramón • Edited

Thank you!

As I say here:

We will work with an example of what I think is a fairly common scenario: a form that validates and submits some data to create a new resource remotely.

We assume that the Question needs to be created remotely in some backend. Although I don't mention Http specifically, the most common strategy is to do this by making a request to an HTTP API.

In any case, the error type could be something entirely different. It is not relevant to understand the concepts presented in the post.

Collapse
 
perty profile image
Per Lundholm

Ok, get it. Thanks.