ilyaglow / go-cortex

:crystal_ball: Cortex API client written in Go https://github.com/TheHive-Project/Cortex
GNU Affero General Public License v3.0
11 stars 1 forks source link

Improve error messages #17

Closed ilyaglow closed 5 years ago

ilyaglow commented 5 years ago

In some circumstances Cortex responds with error messages and unusual http error code (404 for this one):

curl -H 'Authorization: Bearer token' https://cortex/api/analyzer/type/hash
{"type":"NotFoundError","message":"Worker URLhaus_1_0 not found"}

The library should handle this case and return appropriate error message to the user.

ilyaglow commented 5 years ago

Closed in f5f0503