mirror of https://github.com/apache/druid.git
Added friendlier dsql error message for 405 (which occurs when druid.sql.enabled=false) (#7112)
* Added friendlier error message for dsql 405 * no extra char * Changed error message * fixed weird spacing
This commit is contained in:
parent
0b4f771062
commit
c7082ba36e
|
@ -136,6 +136,10 @@ def raise_friendly_error(e):
|
|||
if error_obj['host']:
|
||||
error_text = error_text + ' (' + str(error_obj['host']) + ')'
|
||||
raise DruidSqlException(error_text)
|
||||
elif e.code == 405:
|
||||
error_text = 'HTTP Error {0}: {1}\n{2}'.format(e.code, e.reason + " - Are you using the correct broker URL and " +\
|
||||
"is druid.sql.enabled set to true on your broker?", text)
|
||||
raise DruidSqlException(error_text)
|
||||
else:
|
||||
raise DruidSqlException("HTTP Error {0}: {1}\n{2}".format(e.code, e.reason, text))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue