I am not sure if this is related to the API changes or not but the app stopped syncing data.
I have verified that the app credentials are correct.
getting user (REDACTED)
updating user (REDACTED)
StatusCodeError: 404 - {"message":"Not Found","error":404}
at new StatusCodeError (/app/backend/node_modules/request-promise-core/lib/errors.js:32:15)
at /app/backend/node_modules/request-promise-core/lib/plumbing.js:97:41
at tryCatcher (/app/backend/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/backend/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/backend/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromiseCtx (/app/backend/node_modules/bluebird/js/release/promise.js:641:10)
at _drainQueueStep (/app/backend/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/app/backend/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/app/backend/node_modules/bluebird/js/release/async.js:102:5)
at Async.drainQueues [as _onImmediate] (/app/backend/node_modules/bluebird/js/release/async.js:15:14)
at process.processImmediate (node:internal/timers:471:21) {
statusCode: 404,
error: { message: 'Not Found', error: 404 },
options: {
gzip: true,
json: true,
headers: { 'user-agent': 'web:expanse:v=1.2.9 (hosted by u/REDACTED)' },
baseUrl: 'https://oauth.reddit.com',
qs: { raw_json: 1, count: 9999, limit: 5 },
auth: {
bearer: REDACTED
},
resolveWithFullResponse: true,
timeout: 30000,
transform: [Function: transform],
uri: 'u/REDACTED/gilded/given',
method: 'GET',
callback: [Function: RP$callback],
simple: true,
transform2xxOnly: false
},
response: <ref *1> IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: true,
endEmitted: true,
reading: false,
constructed: true,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
dataEmitted: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function (anonymous)],
error: [Function (anonymous)]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'oauth.reddit.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'oauth.reddit.com',
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
timeout: 30000,
write: [Function: writeAfterFIN],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 909262,
[Symbol(kHandle)]: null,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: -1,
_idlePrev: null,
_idleNext: null,
_idleStart: 36558288,
_onTimeout: null,
_timerArgs: undefined,
_repeat: null,
_destroyed: true,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
update all completed [Symbol(asyncId)]: 909273,
[Symbol(triggerId)]: 909272
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: false,
[Symbol(kSetKeepAliveInitialDelay)]: 0,
[Symbol(kBytesRead)]: 2232,
[Symbol(kBytesWritten)]: 1276,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [
'Connection',
'close',
'Content-Length',
'38',
'x-ua-compatible',
'IE=edge',
'expires',
'-1',
'cache-control',
'private, s-maxage=0, max-age=0, must-revalidate, no-store',
'x-ratelimit-remaining',
'885',
'x-ratelimit-used',
'111',
'x-ratelimit-reset',
'187',
'content-type',
'application/json; charset=UTF-8',
'x-moose',
'majestic',
'Accept-Ranges',
'bytes',
'Date',
'Fri, 22 Sep 2023 07:56:54 GMT',
'Via',
'1.1 varnish',
'Strict-Transport-Security',
'max-age=31536000; includeSubdomains',
'X-Content-Type-Options',
'nosniff',
'X-Frame-Options',
'SAMEORIGIN',
'X-XSS-Protection',
'1; mode=block',
'Set-Cookie',
'loid=0000000000000n3ii0.2.1429864439786.Z0FBQUFBQmxEVWpGOXh5YlVLY1ZVQlZNejVNazlBaEFSQktOX2ZobHgwWGNuZkpya2VNV3ZiMm1pblc3a09rWlBva2lESUR5QUczMDNpOWtyeVp2UjJxY2ozLWt0UDZvRXlnbnpZYVdjVmpEWWhNZ0dJN19EYTQ3SDlqMUlZQ1A1dTRiSUh6cXpXeU8; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Sun, 21-Sep-2025 07:56:53 GMT; secure; SameSite=None; Secure',
'Set-Cookie',
'session_tracker=aifpaeajkddcgelrlb.0.1695369413844.Z0FBQUFBQmxEVWpGVGlKNlRTMUpGLWpNdk95OGExN3ljMFcyQk11MkIzTUFEam8wNVBWNEowNjlBTkFMdENYV2RJODVQZEJmeUpLYnlpV25mMGRGQ0UyUmFsb2M0dlR2UDlBWUM2bEdIS0d1a2lYa3Rta190czlKNDVLVHgySmRhdmxpNmhRVGVaSTc; Domain=reddit.com; Max-Age=7199; Path=/; expires=Fri, 22-Sep-2023 09:56:53 GMT; secure; SameSite=None; Secure',
'Set-Cookie',
'redesign_optout=true; Domain=reddit.com; Max-Age=94607999; Path=/; expires=Mon, 21-Sep-2026 07:56:53 GMT; secure',
'Set-Cookie',
'csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None',
'Set-Cookie',
'edgebucket=5ROveAagHA7U5mmgDi; Domain=reddit.com; Max-Age=63071999; Path=/; secure',
'Server',
'snooserv',
'Report-To',
'{"group": "w3-reporting-nel", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting-nel.reddit.com/reports" }]}, {"group": "w3-reporting", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting.reddit.com/reports" }]}, {"group": "w3-reporting-csp", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting-csp.reddit.com/reports" }]}',
'NEL',
'{"report_to": "w3-reporting-nel", "max_age": 14400, "include_subdomains": false, "success_fraction": 1.0, "failure_fraction": 1.0}'
],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'oauth.reddit.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'oauth.reddit.com',
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [ClientRequest],
timeout: 30000,
write: [Function: writeAfterFIN],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 909262,
[Symbol(kHandle)]: null,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: Timeout {
_idleTimeout: -1,
_idlePrev: null,
_idleNext: null,
_idleStart: 36558288,
_onTimeout: null,
_timerArgs: undefined,
_repeat: null,
_destroyed: true,
[Symbol(refed)]: false,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 909273,
[Symbol(triggerId)]: 909272
},
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: false,
[Symbol(kSetKeepAliveInitialDelay)]: 0,
[Symbol(kBytesRead)]: 2232,
[Symbol(kBytesWritten)]: 1276,
[Symbol(connect-options)]: [Object]
},
_consuming: true,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'GET /user/REDACTED/gilded/given?raw_json=1&count=9999&limit=5 HTTP/1.1\r\n' +
'user-agent: web:expanse:v=1.2.9 (hosted by u/REDACTED)\r\n' +
'authorization: Bearer REDACTED' +
'accept-encoding: gzip, deflate\r\n' +
'accept: application/json\r\n' +
'referer: https://oauth.reddit.com/u/REDACTED/gilded/given?raw_json=1&count=9999&limit=5\r\n' +
'host: oauth.reddit.com\r\n' +
'content-length: 0\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/user/REDACTED/gilded/given?raw_json=1&count=9999&limit=5',
_ended: true,
res: [Circular *1],
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'oauth.reddit.com',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
gzip: true,
headers: [Object],
resolveWithFullResponse: true,
timeout: 30000,
transform: [Function: transform],
uri: [Url],
method: 'get',
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function (anonymous)],
_rp_reject: [Function (anonymous)],
_rp_promise: [Promise [Object]],
_rp_callbackOrig: undefined,
callback: [Function (anonymous)],
_rp_options: [Object],
setHeader: [Function (anonymous)],
hasHeader: [Function (anonymous)],
getHeader: [Function (anonymous)],
removeHeader: [Function (anonymous)],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'oauth.reddit.com',
url: [Url],
path: '/user/REDACTED/gilded/given?raw_json=1&count=9999&limit=5',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
href: 'https://oauth.reddit.com/user/REDACTED/gilded/given?raw_json=1&count=9999&limit=5',
ntick: true,
timeoutTimer: null,
response: [Circular *1],
originalHost: 'oauth.reddit.com',
originalHostHeaderName: 'host',
_started: true,
req: [ClientRequest],
responseContent: [Circular *1],
_destdata: true,
_ended: true,
_callbackCalled: true,
[Symbol(kCapture)]: false
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: { message: 'Not Found', error: 404 },
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: {
connection: 'close',
'content-length': '38',
'x-ua-compatible': 'IE=edge',
expires: '-1',
'cache-control': 'private, s-maxage=0, max-age=0, must-revalidate, no-store',
'x-ratelimit-remaining': '885',
'x-ratelimit-used': '111',
'x-ratelimit-reset': '187',
'content-type': 'application/json; charset=UTF-8',
'x-moose': 'majestic',
'accept-ranges': 'bytes',
date: 'Fri, 22 Sep 2023 07:56:54 GMT',
via: '1.1 varnish',
'strict-transport-security': 'max-age=31536000; includeSubdomains',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '1; mode=block',
'set-cookie': [Array],
server: 'snooserv',
'report-to': '{"group": "w3-reporting-nel", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting-nel.reddit.com/reports" }]}, {"group": "w3-reporting", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting.reddit.com/reports" }]}, {"group": "w3-reporting-csp", "max_age": 14400, "include_subdomains": true, "endpoints": [{ "url": "https://w3-reporting-csp.reddit.com/reports" }]}',
nel: '{"report_to": "w3-reporting-nel", "max_age": 14400, "include_subdomains": false, "success_fraction": 1.0, "failure_fraction": 1.0}'
},
[Symbol(kHeadersCount)]: 50,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0
},
extras: { category: 'awarded' }
} ```