mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-03 23:14:52 +02:00
Fix parsing AcquireJob MessageQueueTokenExpiredError (#2837)
This commit is contained in:
@@ -634,7 +634,18 @@ func (c *Client) AcquireJobs(ctx context.Context, runnerScaleSetId int, messageQ
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, ParseActionsErrorFromResponse(resp)
|
||||
if resp.StatusCode != http.StatusUnauthorized {
|
||||
return nil, ParseActionsErrorFromResponse(resp)
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
body = trimByteOrderMark(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return nil, &MessageQueueTokenExpiredError{msg: string(body)}
|
||||
}
|
||||
|
||||
var acquiredJobs *Int64List
|
||||
|
||||
Reference in New Issue
Block a user