Use more specific error codes for upstream errors
Previously Greenwave returned a generic 500 error for issues connecting
to upstream services (e.g. WaiverDB). This change updates the error
handler to return a 502 or 504 for connection issues or timeout issues,
respectively.