Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "401"
-
Dear nerds from all over the world,
We get it. 404 pics are funny.
But did you know there other status codes too?
Like...
204 - No Response
301 - Moved
302 - Found
400 - Bad request
401 - Unauthorized
402 - Payment Required
403 - Forbidden
501 - Not Implemented
502 - Service Temporarily Overloaded
I'm sure you'll also find funny situations with these.
Thanks. We're the best!26 -
I get nervous every time I go on highway 401 and 404 in Toronto area. Cuz I feel like I'm either on the wrong highway or the highway doesn't exist. If y'all know what I mean, feel how I feel😜4
-
It's maddening how few people working with the internet don't know anything about the protocols that make it work. Web work, especially, I spend far too much time explaining how status codes, methods, content-types etc work, how they're used and basic fundamental shit about how to do the job of someone building internet applications and consumable services.
The following has played out at more than one company:
App: "Hey api, I need some data"
API: "200 (plain text response message, content-type application/json, 'internal server error')"
App: *blows the fuck up
*msg service team*
Me: "Getting a 200 with a plaintext response containing an internal server exception"
Team: "Yeah, what's the problem?"
Me: "...200 means success, the message suggests 500. Either way, it should be one of the error codes. We use the status code to determine how the application processes the request. What do the logs say?"
Team: "Log says that the user wasn't signed in. Can you not read the response message and make a decision?"
Me: "That status for that is 401. And no, that would require us to know every message you have verbatim, in this case, it doesn't even deserialize and causes an exception because it's not actually json."
Team: "Why 401?"
Me: "It's the code for unauthorized. It tells us to redirect the user to the sign in experience"
Team: "We can't authorize until the user signs in"
Me: *angermatopoeia* "Just, trust me. If a user isn't logged in, return 401, if they don't have permissions you send 403"
Team: *googles SO* "Internet says we can use 500"
Me: "That's server error, it says something blew up with an unhandled exception on your end. You've already established it was an auth issue in the logs."
Team: "But there's an error, why doesn't that work?"
Me: "It's generic. It's like me messaging you and saying, "your service is broken". It doesn't give us any insight into what went wrong or *how* we should attempt to troubleshoot the error or where it occurred. You already know what's wrong, so just tell me with the status code."
Team: "But it's ok, right, 500? It's an error?"
Me: "It puts all the troubleshooting responsibility on your consumer to investigate the error at every level. A precise error code could potentially prevent us from bothering you at all."
Team: "How so?"
Me: "Send 401, we know that it's a login issue, 403, something is wrong with the request, 404 we're hitting an endpoint that doesn't exist, 503 we know that the service can't be reached for some reason, 504 means the service exists, but timed out at the gateway or service. In the worst case we're able to triage who needs to be involved to solve the issue, make sense?"
Team: "Oh, sounds cool, so how do we do that?"
Me: "That's down to your technology, your team will need to implement it. Most frameworks handle it out of the box for many cases."
Team: "Ah, ok. We'll send a 500, that sound easiest"
Me: *..l.. -__- ..l..* "Ok, let's get into the other 5 problems with this situation..."
Moral of the story: If this is you: learn the protocol you're utilizing, provide metadata, and stop treating your customers like shit.22 -
Dev gets hold of me, says my service is down in QA. Works if he hits it locally, works via Postman, but via the QA app server it gives a 401.
I’m like, look, if it works everywhere else, there’s something wrong on your side in QA.
He insists, no, I must help him, and begins CCing all the managers telling them this system has been down for days.
So I eventually climb into his system, check the credentials they’re using in the QA environment, and sure enough, the password is wrong.6 -
What's the point of using a framework if you don't use any of its features!? What the heck, I have to fix this damn web frontend that is so broken in many ways.
Instead of using an authentication middleware, every single view has the same block of code to check if a user is authenticated. Instead of templates, they used static HTML/JavaScript files and they passed data to pages through cookies.
The "REST" API is so messed up, nothing is resource-oriented, HTTP methods are chosen randomly as well as status codes. They are returning "412 Precondition Failed" instead of a plain simple "401 Unauthorized" when you're not authenticated! What the hell, did they even bother to check what 412 is about when they copied and pasted it from a crappy website!? I would never come up with 412, not even in my scariest nightmare.
What kind of drugs were they using when they wrote such code? Oh dear, I need a vacation...2 -
Just thought I'd share my current project: Taking an old ISA sound card I got off eBay and wiring it up to an Arduino to control its OPL3 synth from a MIDI keyboard. I have it mostly working now.
No intention to play audio samples, so I've not bothered with any of the DMA stuff - just MIDI (MPU-401 UART) and OPL3.
It has involved learning the pinout of the ISA bus connectors, figuring out which ones are actually used for this card, ignoring the standards a little (hello, amplifier chip that is wired up to the +12V line but which still happily works at +5V...)
Most of the wires going to it are for each bit of the 16-bit address and 8-bit data. Using a couple of shift registers for the address, and a universal shift register for the data. Wrote some fairly primitive ISA bus read/write code, but it was really slow. Eventually found out about SPI and re-wrote the code to use that and it became very fast. Had trouble with some timings, fixed those.
The card is an ISA Plug and Play card, meaning before I could use it I had to tell it what resources to use. Linux driver code and some reverse-engineering of the official Windows/DOS drivers got me past this stage.
Wired up IRQ 5 to an Arduino interrupt to deal with incoming MIDI data, with a routine that buffers it. Ran into trouble with the interrupt happening during I/O and needing to do some I/O inside the handler and had to set a flag to decide whether to disable/re-enable interrupts during I/O.
It looks like total chaos, but the various wires going across the breadboard are mainly to make it easier to deal with the 16-bit address and 8-bit data lines. The LEDs were initially used to check what addresses/data were being sent, but now only one of them is connected and indicates when the interrupt handler is executing.
There's still a lot to do after that though - MIDI and OPL3 are two completely different things so I had to write some code to manage the different "channels" of the OPL3 chip. I have it playing multiple notes at the same time but need to make it able to control the various settings over MIDI. Eventually I might add some physical controls to it and get a PCB made.
The fun part is, I only vaguely know what I'm doing with the electronics side of this. I didn't know what a "shift register" was before this project, nor anything about the workings of the ISA bus. I knew a bit about MIDI (both the protocol and generally how the MPU-401 UART works) along with the operation of a sound card from a driver/software perspective, but everything else is pretty new to me.
As a useful little extra, I made some "fake" components that I can build the software against on a PC, to run some tests before uploading it to the Arduino (mostly just prints out the addresses it is going to try and write to).46 -
Poorly written docs.
I've been fighting with the Epson T88VI printer webconfig api for five hours now.
The official TM-T88VI WebConfig API User's Manual tells me how to configure their printer via the API... but it does so without complete examples. Most of it is there, but the actual format of the API call is missing.
It's basically: call `API_URL` with GET to get the printer's config data (works). Call it with PUT to set the data! ... except no matter what I try, I get either a 401:Unauthorized (despite correct credentials), 403:Forbidden (again...), or an "Invalid Parameter" response.
I have no idea how to do this.
I've tried literally every combination of params, nesting, json formatting, etc. I can think of. Nothing bloody works!
All it would have taken to save me so many hours of trouble is a single complete example. Ten minutes' effort on their part. tops.
asjdf;ahgwjklfjasdg;kh.5 -
Why the fuck does your API have to send 401 when the server is down.
Just spent an hour thinking something was wrong with my auth wrapper.3 -
Boss: "So I'm taking the next week off. In the mean time, I added some stuff for you to do on Gitlab, we'd need you to pull this Docker image, run it, setup the minimal requirement and play with it until you understand what it does."
Me: "K boss, sounds fun!" (no irony here)
First day: Unable to login to the remote repository. Also, I was given a dude's name to contact if I had troubles, the dude didn't answer his email.
2nd day: The dude aswered! Also, I realized that I couldn't reach the repository because the ISP for whom I work blocks everything within specific ports, and the url I had to reach was ":5443". Yay. However, I still can't login to the repo nor pull the image, the connection gets closed.
3rd day (today): A colleague suggested that I removed myself off the ISP's network and use my 4G or something. And it worked! Finally!! Now all I need to do is to set that token they gave me, set a first user, a first password and... get a 400 HTTP response. Fuck. FUCK. FUUUUUUUUUUUUUUUUUUUCK!!!
These fuckers display a 401 error, while returning a 400 error in the console log!! And the errors says what? "Request failed with status code 401" YES THANK YOU, THIS IS SO HELPFUL! Like fuck yea, I know exactly how t fix this, except that I don't because y'all fuckers don't give any detail on what could be the problem!
4th day (tomorrow): I'm gonna barbecue these sons of a bitch
(bottom note: the dude that answered is actually really cool, I won't barbecue him)5 -
Taking my security+ exam on Tuesday. Any advice on what to pay attention to?
I have 401 and 501 materials since I didn't know which I'd end up taking. I had to register for 501. I have friends who have passed 501 using 401 material.5 -
Not much of a haxk, just a stupid thing that works.
In my hs videogame programming class, the teacher has this program called LANSchool (most of you have heard of it) which he used to restrict apps/browsers to the point of uselessness . He didn't (and still doesn't) know anything about the stuff he 'teaches', most is tought by TAs.
Here's the dumb part: he WHITELISTED APPS. A friend, one of the TAs, figured out that if you rename something 'Google Chrome', lanschool wouldn't care. So I got Chromium (for unblocked internet) and switched its blue icons in the exe for original chrome icons, then renamed it 'Google Chrime'. Woo.
LANSchool is such a bad program (you can even unblock a site by spamming the F key for refresh).
The teacher did, and still does, treat the TAs like trash. He's a babysitter while students listen to online vids and the TAs.2 -
FUCK.
NEXTJS.
...
THIS PIECE OF FUCKING SHIT WORKED 4 DAYS AGO.
I CHANGED ***NOTHING***.
4 DAYS LATER I START THE PROJECT AGAIN AND HALF THE STUFF BREAK. NOTHING FUCKING WORKS!!!!!!!
SOMETIMES IT WORKS SOMETIMES IT BREAKS
MESSAGES GET SENT SUCCESSFULLY 2-3 TIMES IN A ROW AND THEN Random 401 error
Random page glitch flickering when routing to new pages rendering the content blank
Random list map iteration crashes on ui dev side
This is such a fucking SHIT
Now i started my angular and spring boot exact same project that i stopped worjing on since october 2023 AND EVERYTHING WORKS FINE WITHOUT ANY RANDOM ERRORS
RANDOM ERRORS ONLY HAPPEN FOR NEXTJS FUCKSHIT FUCKING FRAMEWORK
FUCKIEST DOGSHIT GORILLACUM MAD FUCKIJNNGG RETARD FRAMEWORK FOR AUTISTICS I WASTED SO MUCH TIME LEARNING THIS PIECE OF FUCKING GARBAGE!!!!!!!!!28 -
SO MAD. Hands are shaking after dealing with this awful API for too long. I just sent this to a contact at JP Morgan Chase.
-------------------
Hello [X],
1. I'm having absolutely no luck logging in to this account to check the Order Abstraction service settings. I was able to log in once earlier this morning, but ever since I've received this frustratingly vague "We are currently unable to complete your request" error message (attached). I even switched IP's via a VPN, and was able to get as far as entering the below Identification Code until I got the same message. Has this account been blocked? Password incorrect? What's the issue?
2. I've been researching the Order Abstraction API for hours as well, attempting to defuddle this gem of an API call response:
error=1&message=Authentication+failure....processing+stopped
NOWHERE in the documentation (last updated 14 months ago) is there any reference to this^^ error or any sort of standardized error-handling description whatsoever - unless you count the detailed error codes outlined for the Hosted Payment responses, which this Order Abstraction service completely ignores. Finally, the HTTP response status code from the Abstraction API is "200 OK", signaling that everything is fine and dandy, which is incorrect. The error message indicates there should be a 400-level status code response, such as 401 Unauthorized, 403 Forbidden or at least 400 Bad Request.
Frankly, I am extremely frustrated and tired of working with poorly documented, poorly designed and poorly maintained developer services which fail to follow basic methodology standardized decades ago. Error messages should be clear and descriptive, including HTTP status codes and a parseable response - preferably JSON or XML.
-----
This whole piece of garbage is junk. If you're big enough to own a bank, you're big enough to provide useful error messages to the developers kind enough to attempt to work with you.2 -
The idiot who has taken it upon himself to break into my unfinished, unused, unknown website only uses male names. I'm tempted to change the login process to let female names in (the site is empty so the difference will be a 200 instead of 401) just to see if he ever figures it out.2
-
Microsoft :
"YOLO All Devops pipeline are now .net 8"
Me, lunching PROD release : "Whatever, I don't use any advanced shit"
Pipeline : "Can't connect to your nuget soure (private) : 401"
Me : What ? You just connected to it in prevous step in pipeline !
Azure : Yah, but prev st ep was using different syntax so it worked
Me : Ok, here you go, same syntax
Azure : Still nop.
Me : WHY ?!!!
Azure : I won't tell you. 401 !!
Me : Fuck you, I 'll rewrite this step from scrath !
30 mins later
Azure : Naaaan, stil 401.
Me : HOW ?!!! You literally use this nuget feed in 2 prev steps with no issues.
Azure : Fuck you
Me : fuck you too.
15 mins later
me to me... Hmm, I've already restored all packages. They "should" stay where they are..
Me : Take that azure : Ignore restoring for this step"
Azure : Oh yeah, that works ! All compiled !
WTF ?!!!! And why they release cha ges without even sending a mail. because fuck us apparently.
God I hate devops.... -
Dear everyone,
Stop turning off the monitors. That doesn't sign you out or turn off the computer, it just makes the next person wonder what's taking so long.1 -
other team: accidentally deploys app to staging with incorrect config file
app: gets 401 response from our API due to bad credentials
other team: opens ticket claiming our API is broken and whining that it's holding up their release
me: (⌐■_■) -
!rant
Got my new pc up and running, asrock x370 killer sli/ac mobo, ryzen 2200g cpu and radeon rx550 with 12g ram (don't ask). Nothing fancy but sure beats my old am2 system! New pc is so quiet :D9 -
I've been fighting with my xmlrant.com hosting provider for a good several days now regarding enabling web deploy for my account.
According to their screenshot it all works, according to my various attempts still getting either 404 or 401 with the same login / server details!
So frustrating... It almost looks as though same authentication works differently for them locally and for me externally... Maybe domain name needs to be in FQDN format... Or smth else... Either way this will probably end up with them saying fuck off, all is working on our end.
And as well it might - it just might be my incompetence... *self-doubt creeping in*
But it's still frustrating nevertheless.
So far I need to settle for unreliable FTP deploy, which introduces big overhead as always copies entire deployment folder, even is only a few files are actually changed.
*Le sigh* -
Tester has found an issue: controller input stops working when performing certain steps.
Creates a report and provides an attachment.
The attachment depicts some menu where, at first, the cursor moves around various options, then simply stops moving.
The problem:
Since this is a simple in-game recording, there is neither an overlay of the controller w/ a visual representation of the input actually being provided but not working, nor there is a camera recording available where I can see the tester pressing buttons on a controller.
For all I know, the tester put down the controller / stopped pressing buttons.
...I've also seen reports of animations not working... w/ fucking screenshots attached.
How the fuck can you see something not being animated in a fucking static picture?4 -
My workplace is still using xml based configuration, and non-spring boot projects.
So every spring boot tutorial I find feels like "Look at how easy you can get this running" and then it's just actually a toy you can't get into production.
Also it kind of bugs me that you need to be online to actually be able to initialize/create a spring boot project and every single tutorial says so.
You can make a local network m2 repository, but can one make a spring initializer service?
Either way, migrating every single project to Spring boot is a no-no,
And I'm stuck with like 5 prototypes of SSO integration from which only 2 work, and the other 3 have their own problems.
One does redirect to the login and all, but the SAML endpoint gets 404 on response when you log in.
One is on OpenID Connect, but I would need to update the project from Spring 3 to Spring 5 to get it working, which upon attempting to do seems to break everything else.
One has an external library handling the security context just the way we are accustomed to, but it only does a 401 forbidden when you go without logging in and I'm starting to think it is actually one of those that require you to extract the token or something manual like that, which wouldn't work for us
The other two are spring boot tutorials that worked out of the box, both SAML and OpenID, still can't use those for the main projects.
I'm tired of dealing with this configuration hell, been two months at this, I want to get features done as usual, not be stuck configuring stuff that might or might not work.
Rant aside, I think I figured I need to use a different Security adapter, but I needed to vent.2 -
Employee at leasing office told that they have apartments 401 and 403 available. I have asked for 200 !!2
-
So this is kind of an odd scenario, but bare with me. My client has been issued a JWT token. After having received and stored it, I completely reset the database, and so also emptied the users table. Note that we're using MySQL with auto incrementing ID, whose counter has been reset. The user ID is stored in the JWT, so now the JWT isn't referencing an existing user anymore, so the client will get a 401. The problem arises when a new user registers and is inserted in the new database. That user will get ID 1, and so the old token for the other user will suddenly be valid for another user. I know it's an odd case, but is this a flaw in JWT? I guess an easy solution would be to use random ID's, but I'm still wondering.6
-
Anybody else really annoyed at all these people getting mad at zuckerburg? Like, I've always questioned privacy of the internet in general. If you're dumb enough to put sensitive info on the internet (especially on social media) then you shouldn't have the right to complain about privacy. It's your responsibility to protect your information.3
-
NPM modules are supposed to make us save our time, but very often, after hours and hours of juggling I end up write by myself those fucking functions.
And I'm not talking about unknown packages made by a bored guy in a lazy Sunday, I'm talking about fucking well known modules like passport. OH MY GOD. How much sucky is the passportJS documentation? There are fucking hundreds of options and they are not referenced anywhere if not on StackOverflow. When you login in a website thousands of things can go wrong, why the hell do you always send that shitty 401 and you don't let me control the code? They are two fucking days I'm trying to fix it and I realized I could write that function in 2 minutes if I just didn't use passport. FUCK7 -
I am trying to implement an API. It has a very good documentation, everything is written clear and simple, along with
- HTTP 401 on unauthorized request and
- Error codes from 1-35 with definitions
Opened the provided sample file, changed the username, password and client code fields to our own in the source, then tried the request. The Response:
HTTP 200
{"ErrorCode":-1,"ErrorDescription":"Unauthorized."}
Well, thank you very much! 🤬2 -
A Yahtzee game.
In fewer lines than my first try in 2010.
Fyi... It was like only 15 thousands line with if else statements .... Nuthin much.1 -
!!rant
Just spent a week creating a distributed api architecture which I found out won't work due to a singular issue which can't be solved - not unless I hack stuff to a degree where I might as well write my own frameworks.
I've been aiming the user application's requests towards my wsgi, which based on a custom header will proxy it towards the correct api. Each customer base has their own api and dataset, but they all visit the same address.
I've handled CORS manually, just picking up when there's an options request, asserting the origin, then returning the correct headers. Cool everyone's happy. Turns out, socket.io includes session id and handshake info as part of their options preflight, which I can't pair with my api header (or cookie, for that matter) which means my wsgi doesn't know where to send it. You get a 400! You get a 400! You get a 401! </oprah>
So my option is to either roll my own sockets engine or just assign each api to a subdomain or give it some url prefix or something. Subdomains are probably pretty clean and tidy, but that doesn't change having to rewrite a bunch of stuff and the hours I spent staring at empty headers in options preflights.
At least this discussion saved me some time in trying to make it work. One of my bad habits is getting in those grooves of "but surely... what the hell, surely there's a way. There has to be"
https://github.com/socketio/... -
There was this one time when we've managed to upload a Debug build to Google Play Store.
On the same day we had to create a new build w/ fixes, have the testers perform smoke tests, then switch to some fairly quick overall tests.
If nothing were to come up during those tests, the build was supposed to be passed over to the submission manager for release.
Things weren't going that smoothly in the beginning, w/ the first two builds being broken in one way or another.
Finally, however, we managed to create a properly working build.
QA hadn't had that much time to test it, but no major problems were identified && given the deadline we had to submit it.
The next workday it turned out that the tester responsible for passing the approved build over to the submission manager gave him the Debug build.
The submission manager none the wiser uploaded that build for release.
Result?
The users who managed to update their game got their save data wiped... sort of.
It looked that way given the Debug build was communicating w/ a different server.
In the aftermath of that situation, we had to repair the damage && upload the correct build as quickly as possible.
Also, ever since then a huge text 'DEBUG' was added to the loading screens of Debug builds to make people very aware of which build they were looking at.
As for any repercussions for the tester responsible for the mess, or the submission manager - I have no idea.
They were both still working there, so at the very least none of them got fired because of this. -
I've recently learned how committing of the Save Data to file works in my project.
The file is updated w/ _each change_ made to the settings.
Worse yet - the file is updated even when _no actual change_ is made due to the setting already being at its highest / lowest value possible.
/*
e.g. 5 is maximum sound volume.
- You try increasing the sound volume.
- Setting can't get any higher, so remains unchanged.
- *Update the Save Data*.
*/
What kind of abusive masochist would do that?
// Yes... there's always blame.5 -
How difficult is it to create a custom 401 page in apache while requiring basic auth for the web root. I cant work out how to allow just the file /401.php
I keep getting:
Additionally, a 401 Unauthorized error was encountered while trying to use an ErrorDocument to handle the request.
Any suggestions?
I've tried the following
ErrorDocument 401 /401.php
<Directory "/var/www/glype">
AuthType Basic
AuthName "Site Under Construction - Dev Only"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>
<Files "/var/www/glype/401.php">
order Deny,Allow
Allow from all
</Files>
What am I doing wrong2 -
Have anyone in Norway/Scandinavia ordered a devduck/apparel from the swag store and can tell me how long it did take? Want to order one, but not until at the start of next year.
-
I was trying to learn Java and Python at the same time. Ended up being proficient at Jython.
Now I,m trynna find a compiler that understands my language. Can anyone help?3 -
Getting the angular interceptor working the way I want has proven to be a pain for me. I try to update an auth token, which returns a promise that has to be transformed to an observable again. based on that, redirect to a login page, in case of 401. But nothing works! Either infinite page reload because of the login() promise function of the auth provider or no reaction at all after a router redirect. 😤4
-
You know your e-Post Office really sucks when you receive only now scammers' emails that are _decades_ old.2
-
I need to refresh my Access Token from Flutter app. Should I use token expiry field from Access Token or attempt a request and if get 401 and some error from auth0, refresh token and try again?5