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 - "error msg"
-
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 -
So, basically i am getting desperate, and i'm also angry... and want to cry, and i feel a failure.
My biggest error in this story is "believing"
First of all, I'm a starting entrepreneur as freelancer, started of 6 months ago, back then it all seemed bright, i had my first customer, they believed me, got a second assignment for that same customer, fulfilled the task in brilliance, and was ready to move on to a bigger customer base. Here's where shit goes wrong.
Working with another office that outsources people to various (goverment) contractors, Had a meeting with them, we would cooperate very soon. This was january.
PM: "We've got a gov Dept as a customer that wants to do project XYZ and starting in february, requirements are yadiyadiyadi, you up for it?
Me:"Sure, send me the specs, and timeframe and i'll apply with my offer)"
Project is about a bit backup system migration, lots of fancy shmancy tech used, 2 datacenters setup... a big project that can take up several months...
- sends offer- received an acceptance on the offer
PM " Great, we'll start end of february"
Me: "Ok, end of february is a go then, looking forward to cooperate"
FF to near end of february, receive msg from PM: "Project XYZ delayed until half if march"
Me: "Okay... what is the delay?"
PM:"Govt bureaucracy"
Me " Ok, let's keep in touch"
Near Half of March
PM " Project delayed again".
Me: " Okay... what's the reason?"
PM: "they have decided to take a different approach, and want 3 datacenters now"
Me: "That will change the offer i made for you, can you send me the specs?"
PM: "No, because they havent decided on the techs used, expect end of march"
Me: "Okay...but once you got the specs,s end them to me"
End of March
Pm: " Hy NeatNerdPrime, we still havent got any specs yet... they still forgot to make the shopping list"
Me: "(-_-) ... I thought they already had that covered"
PM:" No, new Govt budget cuts and lots of changes, basically, they still don't know what they really want. But we're just -delayed- , not -cancelled-"
Me: "Okay... i hope we get started soon"
PM: "expect launch beginning of april"
I was not really satisfied with this explanation.... but ok
Beginning of april, at april's folls day
PM "Project delayed again"
Me: " This is a joke right?"
PM: "Sadly, no, they delayed the project since they don't really know what they actually want, we are trying to give them the proposed solution... but they still need approval, and still need to set up shopping list"
Me:"when do we start then?"
PM: " I was told 17th of april'
Me:" I really hope it gets through, i had to decline some proposals for work for months due to this, this ain't funny"
PM: "I know, i'll make up for it"
15th of april...
PM " Project delayed again"
Me right now almost losing my shit
"why this time??? I thought you said 17th of april real launch!"
PM: "they fired their PM, need to hire a new one, delayed until May/June"
Me: "I've set aside some other assignments just because you said you were going to launch at those dates... This is really pushing my limits, can you give me SOME assurances?"
PM: "5th of june would be official go" Me: " Okay, i'm noting 5th of june in my agenda, let's get this through!"
And now i get a message...stating that the date of 5th of june , is for another project, at the same goct dept, but totally different project
WHAT THE FUCKING SHIT I'VE SPENT MONTHS WAITING FOR A PROJECT THAT WAS PRACTICALLY ALL SET AND GO AND EVERY SINGLE FUCKING TIME IT GETS DELAYED, EVERY FUCKING TIME I THINK "you know, i cannot accept these offers since that Govt project will start soon, i cannot do 2 assignments at once especially when they require me to work at govt office at the capital..." AND EVERY FUCKING TIME IT GETS DELAYED!!!
I feel at a loss now..... i've done i think the most horrible thing you can do as a independent and that's not accepting another assignment just because there was a concrete promise for a govt contract...
Almost dried up, nothing much left, had to do some spending because of a move to another apartment... I'm feeling really down, and angry...and down, but mostly angry, for not accepting those offers in the meantime...undefined govt contracts why i'm so gullible promise promises written in butter wtf start dates fucking delays never refuse another assignment again13 -
Sometimes I think "I should write a meaningful error message for this exception" and then i remember how useless 99% of the error messages of every compiler / interpreter I've ever had to use and decide "msg ='something went wrong'" is good enough.3
-
when I was like 11yrs. old, my father has bought a new phone for himself. I used to play a lot of gta vice city those days on my PC. one day i got to use a card reader to exchange multimedia between PC and the phone.
so, i copied gta vice city in my phone. bcoz i knew that i can move around the players using the phone's d-pad. I was left broken when I saw the error msg. in the phone: "file not recognised"
:-/
After few days, my friend wanted to play gta-vc, so he asked for the game CD. but this guy didn't have a computer in his home and he won't listen to me when I try to tell him, "you can't just play a video game in your DVD-player with a TV remote??" So, I gave it to him.
Next day, he was angry at me, bcoz the game didn't worked, obviously it was me who hve messed something in it. :-/
What utterly stupid things you guys or your friends have done?7 -
I've refrained from commenting on which IDE is best and which isn't, what simply works for me is eclipse. So far it handles stuff for me pretty nicely... until today.
Look at this screenshot, can you spot the wtf? Like, SRSLY, WTF.... Might it really be just that DOT at the end or is it just the dot concatenated at the end of the error message?13 -
Spend an entire day on getting an auto-update feature into my cordova app...
APK installer doesn't open, error message doesn't give me any solutions...
Error msg:
exposed beyond app through Intent.getData() -
So I've been reading about rest api and I purpose there should be a standardized keyword for message
like 'errorMsg', 'msg', or just 'message'
I m kind of tired of discovering new acronym for error message or message every time I write a REST service3 -
I have a weird problem ...
There’s an existing swift app, with Apple sign in implemented and working.
When I took over I had to revoke app certificates and create new one. Since then the Apple sign in stopped working.
I’ve tried clean rebuild etc , even tried renewing old profiles with the new cert but nothing is working.
When u do Apple sign in it says “sign up not completed” with no error msg.
Old dev says it happened last time when cert/profile was changed but fixed on proper rebuild. Not fixing for me.
Anybody else faced this?5 -
One dev at the company I work is developing an API and the response for all the requests are basically the same.
However, for example, if you request a login and your credentials are wrong the response gives you:
{
'foo':[],
'var':[],
'msg':'credentials error'
}
But if the credentials are correct, the response gives you:
{
'foo':[
'stuff1':1,
'stuff2':2,
'stuff3':3
],
'var':[
'var1':1,
'var2':2,
'var3':3
],
'msg':'logged in!'
}
Is that correct? I mean, does that compromises security?5 -
I am trying to extract data from the PubSub subscription and finally, once the data is extracted I want to do some transformation. Currently, it's in bytes format. I have tried multiple ways to extract the data in JSON format using custom schema it fails with an error
TypeError: __main__.MySchema() argument after ** must be a mapping, not str [while running 'Map to MySchema']
**readPubSub.py**
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
import json
import typing
class MySchema(typing.NamedTuple):
user_id:str
event_ts:str
create_ts:str
event_id:str
ifa:str
ifv:str
country:str
chip_balance:str
game:str
user_group:str
user_condition:str
device_type:str
device_model:str
user_name:str
fb_connect:bool
is_active_event:bool
event_payload:str
TOPIC_PATH = "projects/nectar-259905/topics/events"
def run(pubsub_topic):
options = PipelineOptions(
streaming=True
)
runner = 'DirectRunner'
print("I reached before pipeline")
with beam.Pipeline(runner, options=options) as pipeline:
message=(
pipeline
| "Read from Pub/Sub topic" >> beam.io.ReadFromPubSub(subscription='projects/triple-nectar-259905/subscriptions/bq_subscribe')#.with_output_types(bytes)
| 'UTF-8 bytes to string' >> beam.Map(lambda msg: msg.decode('utf-8'))
| 'Map to MySchema' >> beam.Map(lambda msg: MySchema(**msg)).with_output_types(MySchema)
| "Writing to console" >> beam.Map(print))
print("I reached after pipeline")
result = message.run()
result.wait_until_finish()
run(TOPIC_PATH)
If I use it directly below
message=(
pipeline
| "Read from Pub/Sub topic" >> beam.io.ReadFromPubSub(subscription='projects/triple-nectar-259905/subscriptions/bq_subscribe')#.with_output_types(bytes)
| 'UTF-8 bytes to string' >> beam.Map(lambda msg: msg.decode('utf-8'))
| "Writing to console" >> beam.Map(print))
I get output as
{
'user_id': '102105290400258488',
'event_ts': '2021-05-29 20:42:52.283 UTC',
'event_id': 'Game_Request_Declined',
'ifa': '6090a6c7-4422-49b5-8757-ccfdbad',
'ifv': '3fc6eb8b4d0cf096c47e2252f41',
'country': 'US',
'chip_balance': '9140',
'game': 'gru',
'user_group': '[1, 36, 529702]',
'user_condition': '[1, 36]',
'device_type': 'phone',
'device_model': 'TCL 5007Z',
'user_name': 'Minnie',
'fb_connect': True,
'event_payload': '{"competition_type":"normal","game_started_from":"result_flow_rematch","variant":"target"}',
'is_active_event': True
}
{
'user_id': '102105290400258488',
'event_ts': '2021-05-29 20:54:38.297 UTC',
'event_id': 'Decline_Game_Request',
'ifa': '6090a6c7-4422-49b5-8757-ccfdbad',
'ifv': '3fc6eb8b4d0cf096c47e2252f41',
'country': 'US',
'chip_balance': '9905',
'game': 'gru',
'user_group': '[1, 36, 529702]',
'user_condition': '[1, 36]',
'device_type': 'phone',
'device_model': 'TCL 5007Z',
'user_name': 'Minnie',
'fb_connect': True,
'event_payload': '{"competition_type":"normal","game_started_from":"result_flow_rematch","variant":"target"}',
'is_active_event': True
}
Please let me know if I m doing something wrong while parsing the data to JSON. Also, I am looking for examples to do data masking and run some SQL within Apache Beam4 -
Disclaimer: I love open source and I adore the owasp for what they do.
BUT owasp zap has to be the most overly complicated, badly documented tool in existence. As long as one stays within its most basic functions everything is fine, setting it up as a proxy and even issuing a root cert for our test devices worked wonderfully simple.
Then I made the mistake to try to actually do anything with the data we pulled and had to dive into the scripting console.
The documentation basically consists only of "This thing exists", it provides a msg object with no information what it contains or how it's structured, has no code completion and, here comes the kicker, if the script is run and has an error it gets flagged and can't be reenabled after the error is fixed. So I'm currently at forwarder48.groovy trying to simply store the request on a database for possible diagnostics.
So right now I already know that I'll spend most of my vacation next week trying to decipher the source, document it, fix that damn "flagged as error" bullshit and jump through a billion hoops trying to get a pull request through.2