Previously, status 200 was set for file export, which is used for backup, which resulted in an inability to set an error status code in case of a problem with file generation.
After this change, status code 200 would be written automatically by Go before we start writing the response's body.
Also, add meaningful error for lack of auth on import, remap and backup.
Previously, the error printed was just the following:
error response "401 Unauthorized", Unauthorized"
New error:
error response "401 Unauthorized", ensure you have set ADMIN_PASSWD and provided it to the command you're running: Unauthorized
Previously, status 200 was set for file export, which is used for backup, which resulted in an inability to set an error status code in case of a problem with file generation.
After this change, status code 200 would be written automatically by Go before we start writing the response's body.
Also, add meaningful error for lack of auth on import, remap and backup.
Previously, the error printed was just the following:
New error: