mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-17 08:57:55 +00:00
More tests and human review
This commit is contained in:
+2
-2
@@ -84,7 +84,7 @@ func ParseURL(s3URL string) (*Config, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// parseError reads an S3 error response and returns an *ErrorResponse.
|
||||
// parseError reads an S3 error response and returns an *errorResponse.
|
||||
func parseError(resp *http.Response) error {
|
||||
body, err := io.ReadAll(io.LimitReader(resp.Body, maxResponseBytes))
|
||||
if err != nil {
|
||||
@@ -94,7 +94,7 @@ func parseError(resp *http.Response) error {
|
||||
}
|
||||
|
||||
func parseErrorFromBytes(statusCode int, body []byte) error {
|
||||
errResp := &ErrorResponse{
|
||||
errResp := &errorResponse{
|
||||
StatusCode: statusCode,
|
||||
Body: string(body),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user