Le0X8 / additional-readme-stats

Enhance your profile or repository README with some additional stats!
https://armstats.leox.dev
MIT License
0 stars 0 forks source link

Bug: /spotify/current causing an error sometimes #1

Closed Le0X8 closed 7 months ago

Le0X8 commented 8 months ago

/spotify/current returns the following HTML code instead of the SVG:

<br />
<b>Fatal error</b>:  Uncaught mysqli_sql_exception: Duplicate entry 'ji431f2ja6vyczqq0eatna6jb' for key 'PRIMARY' in /www/htdocs/w01c082e/armstats.leox.dev/src/apis/spotify/recents/recents.php:244
Stack trace:
#0 /www/htdocs/w01c082e/armstats.leox.dev/src/apis/spotify/recents/recents.php(244): mysqli_query(Object(mysqli), 'INSERT INTO spo...')
#1 /www/htdocs/w01c082e/armstats.leox.dev/src/apis/spotify/current/current.php(29): include('/www/htdocs/w01...')
#2 /www/htdocs/w01c082e/armstats.leox.dev/src/apis/spotify/spotify.php(350): include('/www/htdocs/w01...')
#3 /www/htdocs/w01c082e/armstats.leox.dev/index.php(55): include('/www/htdocs/w01...')
#4 {main}
  thrown in <b>/www/htdocs/w01c082e/armstats.leox.dev/src/apis/spotify/recents/recents.php</b> on line <b>244</b><br />

The ./html endpoint works fine for some reason though

Le0X8 commented 7 months ago

Shouldn't be a problem anymore.