()
| 37 | } |
| 38 | |
| 39 | func (m Error) StatusCode() int { |
| 40 | switch m.Err.(type) { |
| 41 | case ContainerNotFoundError: |
| 42 | return http.StatusNotFound |
| 43 | case ProcessNotFoundError: |
| 44 | return http.StatusNotFound |
| 45 | } |
| 46 | |
| 47 | return http.StatusInternalServerError |
| 48 | } |
| 49 | |
| 50 | func (m Error) MarshalJSON() ([]byte, error) { |
| 51 | var errorType errType |