500 Internal Server Error
joselages opened this issue · comments
Hello,
I am building a dummy project to learn and I haven't add a problem until today. I was trying to fetch data and got the following:
GotError [HTTPError]: Response code 500 (Internal Server Error) at EventEmitter.<anonymous> (D:\laragon\www\cp_visualizer\node_modules\got\source\as-promise.js:74:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) { host: 'api.cp.pt', hostname: 'api.cp.pt', method: 'POST', path: '/cp-api/oauth/token', socketPath: undefined, protocol: 'https:', url: 'https://api.cp.pt/cp-api/oauth/token', gotOptions: { path: '/cp-api/oauth/token', protocol: 'https:', slashes: true, auth: null, host: 'api.cp.pt', port: null, hostname: 'api.cp.pt', hash: null, search: null, query: null, pathname: '/cp-api/oauth/token', href: 'https://api.cp.pt/cp-api/oauth/token', retry: { retries: [Function (anonymous)], methods: Set(6) { 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' }, statusCodes: Set(7) { 408, 413, 429, 500, 502, 503, 504 }, errorCodes: Set(8) { 'ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN' } }, headers: { 'user-agent': 'got/9.6.0 (https://github.com/sindresorhus/got)', accept: 'application/json', authorization: 'Basic Y3AtbW9iaWxlOnBhc3M=', 'content-type': 'application/x-www-form-urlencoded', 'accept-encoding': 'gzip, deflate', 'content-length': 29 }, hooks: { beforeRequest: [], beforeRedirect: [], beforeRetry: [], afterResponse: [], beforeError: [], init: [] }, decompress: true, throwHttpErrors: true, followRedirect: true, stream: false, form: false, json: false, cache: false, useElectronNet: false, body: 'grant_type=client_credentials', method: 'POST' }, statusCode: 500, statusMessage: 'Internal Server Error', headers: { server: 'nginx/1.14.0 (Ubuntu)', date: 'Tue, 12 Apr 2022 20:14:32 GMT', 'content-type': 'application/json;charset=UTF-8', 'transfer-encoding': 'chunked', connection: 'close', 'x-content-type-options': 'nosniff', 'x-xss-protection': '1; mode=block', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', pragma: 'no-cache', expires: '0', 'strict-transport-security': 'max-age=0', 'x-frame-options': 'SAMEORIGIN', vary: 'accept-encoding', 'content-encoding': 'gzip' }, body: '{"error":"server_error","error_description":"PreparedStatementCallback; SQL [select token_id, token from oauth_access_token where authentication_id = ?]; Transaction (Process ID 396) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 396) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."}' }
Just to let you know.
Great job on ths package by the way, i love it 👍
Same thing here, was enjoying so much fiddling around, but I can't fetch data anymore either.